<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OR operator Archives - NeuralLantern.com</title>
	<atom:link href="https://www.NeuralLantern.com/tag/or-operator/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.NeuralLantern.com/tag/or-operator/</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jun 2025 06:15:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://www.NeuralLantern.com/wp-content/uploads/2025/04/cropped-2025-04-04-Lantern-03-32x32.png</url>
	<title>OR operator Archives - NeuralLantern.com</title>
	<link>https://www.NeuralLantern.com/tag/or-operator/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Master Bitwise Operators: OR, AND, NOT, XOR, NOR for Beginners</title>
		<link>https://www.NeuralLantern.com/master-bitwise-operators-or-and-not-xor-nor-for-beginners/</link>
					<comments>https://www.NeuralLantern.com/master-bitwise-operators-or-and-not-xor-nor-for-beginners/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Mon, 30 Jun 2025 06:15:25 +0000</pubDate>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[AND operator]]></category>
		<category><![CDATA[binary logic]]></category>
		<category><![CDATA[binary operations]]></category>
		<category><![CDATA[bit manipulation]]></category>
		<category><![CDATA[bitwise operators]]></category>
		<category><![CDATA[C programming]]></category>
		<category><![CDATA[coding for beginners]]></category>
		<category><![CDATA[coding tips]]></category>
		<category><![CDATA[computer science basics]]></category>
		<category><![CDATA[NOR operator]]></category>
		<category><![CDATA[NOT operator]]></category>
		<category><![CDATA[OR operator]]></category>
		<category><![CDATA[programming tutorial]]></category>
		<category><![CDATA[tech tutorials]]></category>
		<category><![CDATA[XOR operator]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=173</guid>

					<description><![CDATA[<p>Learn bitwise operators (OR, AND, NOT, XOR, NOR) with clear examples. Perfect for beginners mastering binary logic in programming.</p>
<p>The post <a href="https://www.NeuralLantern.com/master-bitwise-operators-or-and-not-xor-nor-for-beginners/">Master Bitwise Operators: OR, AND, NOT, XOR, NOR for Beginners</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Master Bitwise Operators: OR, AND, NOT, XOR, NOR for Beginners" width="1380" height="776" src="https://www.youtube.com/embed/mL_wTRllqtc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">Want to understand bitwise operators? This video dives into OR, AND, NOT, XOR, and NOR with easy-to-follow examples. Learn how to use these operators for flags, masks, and more in programming. Perfect for beginners or anyone wanting to master binary logic in C or other languages. I break it down with real examples, a touch of humor, and no fluff. Subscribe for more coding tutorials, and check out my site for extra resources. Drop a comment with your questions or video ideas!</p>



<p class="wp-block-paragraph">Introduction to Logical Operators 00:00:00<br>Explanation of Bitwise OR 00:00:35<br>OR Operation Examples 00:01:01<br>Bitwise OR with Multiple Bits 00:02:12<br>Using OR for Flags 00:03:52<br>Introduction to Logical AND 00:08:06<br>AND Operation Examples 00:08:29<br>Using AND as a Mask 00:10:00<br>Checking Specific Bits with AND 00:11:17<br>Introduction to NOT Operation 00:13:36<br>Introduction to NOR Operation 00:14:38<br>Introduction to XOR Operation 00:16:37<br>XOR and Neural Networks 00:16:53<br>Conclusion and Call to Action 00:18:38</p>



<p class="wp-block-paragraph">Thanks for watching!</p>



<p class="wp-block-paragraph">Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>
</ul>



<p class="wp-block-paragraph">Please help support us!</p>



<ul class="wp-block-list">
<li>Subscribing + Sharing on Social Media</li>



<li>Leaving a comment or suggestion</li>



<li>Subscribing to our Blog</li>



<li>Watching the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p class="wp-block-paragraph">Hey everybody! In this video I&#8217;m going to talk about basic logical operators such as OR and AND.</p>



<p class="wp-block-paragraph">Uh so let&#8217;s let&#8217;s dive right into it. What am I talking about with the OR and AND?</p>



<p class="wp-block-paragraph">Suppose for the sake of argument that this notepad is totally dark and I wanted it to be really light</p>



<p class="wp-block-paragraph">and then I have to go into the system settings to fix it. Sorry let me change my theme.</p>



<p class="wp-block-paragraph">How about that?</p>



<p class="wp-block-paragraph">Okay.</p>



<p class="wp-block-paragraph">So suppose for the sake of argument, we&#8217;ve got, you know, a couple of bits.</p>



<p class="wp-block-paragraph">These are going to be a bitwise operations for the most part.</p>



<p class="wp-block-paragraph">In other languages, sometimes we will say logical operator, but actually we&#8217;re just</p>



<p class="wp-block-paragraph">talking about values rather than bits individually.</p>



<p class="wp-block-paragraph">So these are bitwise operators.</p>



<p class="wp-block-paragraph">Imagine we have like a couple of bits.</p>



<p class="wp-block-paragraph">Remember the possible values for bits are just, you know, a zero and a one binary.</p>



<p class="wp-block-paragraph">So suppose we have a couple of values.</p>



<p class="wp-block-paragraph">values, let&#8217;s say we have a zero here and a one.</p>



<p class="wp-block-paragraph">So if I apply a logical or to the zero and the one,</p>



<p class="wp-block-paragraph">the result is going to be a one because either the first bit or the second bit are a one.</p>



<p class="wp-block-paragraph">You could also expand these operators to have multiple sets of bits,</p>



<p class="wp-block-paragraph">but we&#8217;re just going to do, you know, one set against another set.</p>



<p class="wp-block-paragraph">In this case, each set is just one bit long, but we&#8217;ll do, we&#8217;ll do a more complicated stuff in a minute.</p>



<p class="wp-block-paragraph">If I have a zero and a one, then the answer there is, well, let me just put or maybe.</p>



<p class="wp-block-paragraph">The answer is a one.</p>



<p class="wp-block-paragraph">I&#8217;ll put or maybe at the top, just like or to let you know that we&#8217;re doing ors here</p>



<p class="wp-block-paragraph">on the top.</p>



<p class="wp-block-paragraph">So if we have a zero and a one, the answer is going to be a one.</p>



<p class="wp-block-paragraph">If we have a one and a zero, the answer is going to be a one.</p>



<p class="wp-block-paragraph">Also, if we have two ones, which looks like an L over there, I got to work on my penmanship.</p>



<p class="wp-block-paragraph">Then the answer is also going to be a one.</p>



<p class="wp-block-paragraph">if either of the bits in question are a one then the answer should be a one. The only case with an</p>



<p class="wp-block-paragraph">OR that results in a zero is if both of the bits are zero because neither the first or the second</p>



<p class="wp-block-paragraph">are actually a one right so this is the basic idea of using an OR operator and you can also do this</p>



<p class="wp-block-paragraph">with multiple bits at the same time like for example we could say let&#8217;s take a bunch of random</p>



<p class="wp-block-paragraph">work on the it&#8217;s the pressure dude the l&#8217;s are driving me crazy okay oh my god okay so i do that</p>



<p class="wp-block-paragraph">and i let go okay i&#8217;m just going to put some random bits uh underneath the the first set of</p>



<p class="wp-block-paragraph">random bits put like a zero here and then like a one here maybe and we&#8217;ll say that we&#8217;re going to</p>



<p class="wp-block-paragraph">do a logical or just like you might think of doing a you know addition or subtraction we&#8217;ll just say</p>



<p class="wp-block-paragraph">you know, addition or subtraction. We&#8217;ll just say we&#8217;re going to or these two sets of bits.</p>



<p class="wp-block-paragraph">Actually, these are six on the top and six on the bottom. If I add two more, then it&#8217;ll be a nice</p>



<p class="wp-block-paragraph">little bite for the top and the bottom. So I&#8217;m just going to do that, you know, to have eight</p>



<p class="wp-block-paragraph">bits on the top and eight bits on the bottom. Okay. So if I just want to logically or two sets</p>



<p class="wp-block-paragraph">of bits, literally, I just have to do one pair of bits at a time. So a one or zero is just a one.</p>



<p class="wp-block-paragraph">One or zero is just a one, a zero or one is a one, a one or zero is a one, a zero or one</p>



<p class="wp-block-paragraph">is a one.</p>



<p class="wp-block-paragraph">And then these ones, everything is just a one.</p>



<p class="wp-block-paragraph">Okay.</p>



<p class="wp-block-paragraph">So that was too easy.</p>



<p class="wp-block-paragraph">Maybe if I, I don&#8217;t know, maybe if I change one of these ones to a zero, then we would</p>



<p class="wp-block-paragraph">actually be able to have a zero somewhere in here.</p>



<p class="wp-block-paragraph">So that&#8217;s a logical or a bitwise or operator or operation.</p>



<p class="wp-block-paragraph">So you can, you can kind of use this in various ways.</p>



<p class="wp-block-paragraph">can kind of use this in various ways i mean obviously if you want to manipulate some bits</p>



<p class="wp-block-paragraph">this can be pretty useful inside of the machine but there was kind of an old school way that</p>



<p class="wp-block-paragraph">people did flags with arguments they would basically say something like this they would go</p>



<p class="wp-block-paragraph">in their computer program they would say you know flag a name it something like turn on the display</p>



<p class="wp-block-paragraph">or enable caching or just like whatever right so we&#8217;ll just have a flag we&#8217;ll call it flag a</p>



<p class="wp-block-paragraph">that value is equal to a one and then maybe flag b its value is equal to a two and then flag c</p>



<p class="wp-block-paragraph">its value would be a four and then we basically just double the value of the flag and the reason</p>



<p class="wp-block-paragraph">for that c d e f i&#8217;ll just stop with f maybe oh wait that was supposed to be 16 and that&#8217;s 32.</p>



<p class="wp-block-paragraph">the reason for that is if you double the value of each flag so that uh</p>



<p class="wp-block-paragraph">and then you can do a bitwise or against all of these flags and sort of combine multiple flags.</p>



<p class="wp-block-paragraph">Because if you think about it, if we&#8217;re talking about binary,</p>



<p class="wp-block-paragraph">if we suppose this is just a regular eight bit number, then, you know, the first bit has a</p>



<p class="wp-block-paragraph">strength of one. If you&#8217;ve seen my other videos for converting between binary and hex,</p>



<p class="wp-block-paragraph">the second bit has a strength of two. The next bit has a strength of four and then eight and</p>



<p class="wp-block-paragraph">and then 32 and 64 and then 128.</p>



<p class="wp-block-paragraph">And so if you look at the flags,</p>



<p class="wp-block-paragraph">1, 2, 4, 8, 16, 32,</p>



<p class="wp-block-paragraph">they map to only one bit.</p>



<p class="wp-block-paragraph">It&#8217;s not going to be some kind of random pattern for these numbers.</p>



<p class="wp-block-paragraph">It&#8217;s literally going to be flag A is going to look like this.</p>



<p class="wp-block-paragraph">1, 2, 3, 4, 5, 6, 7, 8.</p>



<p class="wp-block-paragraph">And then flag B is going to look like this.</p>



<p class="wp-block-paragraph">1, 2, 3, 4, 5, 6, 7, 8.</p>



<p class="wp-block-paragraph">five, six, seven, eight. And flag D is going to look like this. Whoops. Let me make that green.</p>



<p class="wp-block-paragraph">Still getting used to this. Oh, sorry. C is the next one. One, two, three, four, five,</p>



<p class="wp-block-paragraph">six, seven, eight. Can you see the pattern here? Let me just do D and be done with it at this</p>



<p class="wp-block-paragraph">point. One, two, three, four, five, six, seven, eight. So because we&#8217;re increasing the value of</p>



<p class="wp-block-paragraph">the flags by a power of two, or by a power of two, they&#8217;ll always correspond to just one bit.</p>



<p class="wp-block-paragraph">they&#8217;ll always correspond to just one bit, which means if you apply a logical or operation,</p>



<p class="wp-block-paragraph">you can represent a bunch of different flags with just one number.</p>



<p class="wp-block-paragraph">Think about this.</p>



<p class="wp-block-paragraph">What if I wanted to have, oh, I don&#8217;t know.</p>



<p class="wp-block-paragraph">Let me erase this.</p>



<p class="wp-block-paragraph">What if I wanted to have some, let&#8217;s say I wanted flag A and flag D and flag F just for</p>



<p class="wp-block-paragraph">the sake of argument.</p>



<p class="wp-block-paragraph">Dang, this pen.</p>



<p class="wp-block-paragraph">It&#8217;s actually my fault completely, but I need to practice.</p>



<p class="wp-block-paragraph">but I need to practice F okay and DNF so that would basically be you know 1 2 3 4 5 6 7 8</p>



<p class="wp-block-paragraph">and then D would be the 8 so a 1 0 0 0 there and then a bunch of zeros elsewhere and then the F</p>



<p class="wp-block-paragraph">So if we did an OR between all of those, then the OR is just basically 00101001.</p>



<p class="wp-block-paragraph">And if you convert that from binary to decimal, what is that?</p>



<p class="wp-block-paragraph">That&#8217;s a 1248 plus 8 plus 1248 and then a 32.</p>



<p class="wp-block-paragraph">So 41.</p>



<p class="wp-block-paragraph">just write down the number 41 and if the programmer is smart enough to you know parse all the bits</p>



<p class="wp-block-paragraph">and everything then they&#8217;ll know that you have flags a and d and f set that&#8217;s not necessarily</p>



<p class="wp-block-paragraph">something that all the modern programs do anymore it was much more popular in the olden days but i</p>



<p class="wp-block-paragraph">think some people still kind of do it especially if they&#8217;re programming in c and other languages</p>



<p class="wp-block-paragraph">where they want speed it&#8217;s pretty fast to look at bits inside of the machine so keep that in mind</p>



<p class="wp-block-paragraph">Keep that in mind now we know how to do an OR operation and we know one reason that it might be useful and</p>



<p class="wp-block-paragraph">Yeah, okay. I&#8217;m gonna move on to the next operation</p>



<p class="wp-block-paragraph">So clearing the screen now</p>



<p class="wp-block-paragraph">Hello little doggy he barked and now he&#8217;s in the room</p>



<p class="wp-block-paragraph">Let&#8217;s do</p>



<p class="wp-block-paragraph">The logical AND operation okay, so suppose we have two bits here</p>



<p class="wp-block-paragraph">in a one only if both of the input bits are a one i&#8217;m gonna whoops i accidentally cleared the whole</p>



<p class="wp-block-paragraph">entire thing let me forget where my red pen is okay and okay so if we have a zero and a zero</p>



<p class="wp-block-paragraph">the result is zero because neither of those are a one if we have a zero and a one the result is</p>



<p class="wp-block-paragraph">still going to be zero because we need both bits to be a one to result in a one so then that means</p>



<p class="wp-block-paragraph">would also result in a zero. So you get a bunch of zeros until finally you have an input pattern</p>



<p class="wp-block-paragraph">that is just two ones. And then finally the result is one. So that&#8217;s a logical and.</p>



<p class="wp-block-paragraph">Let me do a quick example so we can and a bunch of bits together. I&#8217;m just going to do more</p>



<p class="wp-block-paragraph">random bit patterns. So there&#8217;s another L there. I&#8217;m cringing. I&#8217;m self-cringing. One, two, three,</p>



<p class="wp-block-paragraph">okay so then i&#8217;ll do like another one there and like a zero there and a zero maybe a couple of</p>



<p class="wp-block-paragraph">ones maybe three ones and then a zero and then one i guess and we&#8217;ll just say that we&#8217;re going</p>



<p class="wp-block-paragraph">to end those together so and oh man i&#8217;m mixing uppercase and lowercase like crazy</p>



<p class="wp-block-paragraph">so uh to end them together you know that bit position right here that&#8217;s going to be a one</p>



<p class="wp-block-paragraph">and then we have a zero because they don&#8217;t match they&#8217;re not both one and then we have another zero</p>



<p class="wp-block-paragraph">a one and then we have a zero and a zero and a zero and a one so this is a logical and you can</p>



<p class="wp-block-paragraph">use logical ands for a wide variety of things but one thing you can kind of do somewhat easily is to</p>



<p class="wp-block-paragraph">use one number as a mask against another number for example notice how uh suppose this was the</p>



<p class="wp-block-paragraph">input number let&#8217;s just say we have the input number up top and maybe you wanted to make sure</p>



<p class="wp-block-paragraph">because you&#8217;re you&#8217;re checking for those bits individually or maybe you want to just prevent</p>



<p class="wp-block-paragraph">the input from having certain bits on for some other reason well you can you can apply the mask</p>



<p class="wp-block-paragraph">as the second bit and use a logical and i&#8217;ll say mask here sorry you can apply a mask as the second</p>



<p class="wp-block-paragraph">bit pattern and notice how in the answer there are only ones where both you know the input and</p>



<p class="wp-block-paragraph">means if I wanted to just control only which ones are allowed I can use the mask notice how the mask</p>



<p class="wp-block-paragraph">has ones in these positions and there are definitely no zeros sorry there are definitely</p>



<p class="wp-block-paragraph">no ones in any position where a mask had a zero so the mask can kind of like you know mute or mask</p>



<p class="wp-block-paragraph">or control the input pattern if that makes sense hopefully another thing we could do if we wanted</p>



<p class="wp-block-paragraph">if one bit exists. Let me go ahead and clear this real fast. I&#8217;m going to just do maybe four</p>



<p class="wp-block-paragraph">bits this time. So we could obviously do an and against four zeros, and this would result in just,</p>



<p class="wp-block-paragraph">you know, a resulting pattern of zero. So this is not super useful. The result would just</p>



<p class="wp-block-paragraph">definitely be four zeros. But notice again how the second pattern is sort of controlling what&#8217;s</p>



<p class="wp-block-paragraph">allowed to go through from the first pattern. Suppose I wanted to check to see if that particular</p>



<p class="wp-block-paragraph">particular bit was on or off.</p>



<p class="wp-block-paragraph">All I have to do is mask it with a one in the correct pattern.</p>



<p class="wp-block-paragraph">So, you know, the second bit that I just wrote down on the bottom row,</p>



<p class="wp-block-paragraph">I just want to see if that second bit is on or off in the input pattern.</p>



<p class="wp-block-paragraph">I don&#8217;t care about any of the other bits.</p>



<p class="wp-block-paragraph">That means the result will be this.</p>



<p class="wp-block-paragraph">So now it&#8217;s much more easy for me to see if that bit is on.</p>



<p class="wp-block-paragraph">I could just compare the value of those bits to a regular integer.</p>



<p class="wp-block-paragraph">Like, for example, if we consider that this was the one and this was the two</p>



<p class="wp-block-paragraph">considered that this was the one and this was the two and this was the four or sorry four and then</p>



<p class="wp-block-paragraph">the eight I could just ask now if the final value equals two and then I would know if that bit was</p>



<p class="wp-block-paragraph">on or not in the original pattern and so if I wanted to check to see if this other you know</p>



<p class="wp-block-paragraph">bit was on I can move this over here and set that back to a zero so the resulting pattern would be</p>



<p class="wp-block-paragraph">zeros then I&#8217;d ask myself is the resulting value equal to four no it&#8217;s equal to zero and so then</p>



<p class="wp-block-paragraph">Another thing you can do that I&#8217;m going to talk about in a future video is just sort of shift the bits over.</p>



<p class="wp-block-paragraph">You could, instead of checking to see if the value was a 4 or like a direct integer,</p>



<p class="wp-block-paragraph">you could just sort of shift over a certain number of spots and then check to see if it was equal to 1 or 0.</p>



<p class="wp-block-paragraph">Let me put this 1 back over into its original position just so that we&#8217;ll have something that had a 1.</p>



<p class="wp-block-paragraph">is one from uh you know the right side if it&#8217;s one to the left from the right side</p>



<p class="wp-block-paragraph">then i could just shift all the bits one to the right and end up with a pattern that is zero zero</p>



<p class="wp-block-paragraph">zero one i&#8217;m not going to talk about bit shifting operations in this video but just know that you can</p>



<p class="wp-block-paragraph">and you&#8217;ll see more of it in a future video so then you know this is another way to check to</p>



<p class="wp-block-paragraph">see if a bit was on first you do a mask for that bit and then you shift bits and then you just</p>



<p class="wp-block-paragraph">check to see if the final value is a zero or one which may or may not feel easier than checking for</p>



<p class="wp-block-paragraph">or may not feel easier than checking for an actual integer in your program.</p>



<p class="wp-block-paragraph">Okay, so we&#8217;ve done OR and also AND. The next bit pattern is called a NOT, which is really easy.</p>



<p class="wp-block-paragraph">It&#8217;s literally just an inversion of the original bit pattern. So for the NOT, we don&#8217;t really take</p>



<p class="wp-block-paragraph">two bits against each other. We just take an input bit and we just invert it. We&#8217;ll just say</p>



<p class="wp-block-paragraph">So that&#8217;s a knot. Pretty easy. We could also knot, you know, a random bit pattern with Ls.</p>



<p class="wp-block-paragraph">So I swear, somebody&#8217;s going to show up and this is their first computer science video.</p>



<p class="wp-block-paragraph">They&#8217;re going to go tell their parents, hey, there&#8217;s Ls in computer science.</p>



<p class="wp-block-paragraph">So sorry. I&#8217;m so sorry. Okay. So I got four there. So if I knot those, then that&#8217;s pretty easy.</p>



<p class="wp-block-paragraph">It&#8217;s just going to be the opposite, you know, an inversion.</p>



<p class="wp-block-paragraph">you know, an inversion.</p>



<p class="wp-block-paragraph">One, zero, one, zero.</p>



<p class="wp-block-paragraph">Let me just double check that I did that correctly.</p>



<p class="wp-block-paragraph">Yeah, so that&#8217;s the knot pattern.</p>



<p class="wp-block-paragraph">No big deal.</p>



<p class="wp-block-paragraph">Pretty easy.</p>



<p class="wp-block-paragraph">So then maybe the next thing that we can talk about is the nor,</p>



<p class="wp-block-paragraph">which just means not or.</p>



<p class="wp-block-paragraph">So let me draw that out real fast just to show you what I&#8217;m talking about.</p>



<p class="wp-block-paragraph">So if we do nor, pretty much you can imagine first taking the or and then knotting it.</p>



<p class="wp-block-paragraph">So inverting the or.</p>



<p class="wp-block-paragraph">the OR. So for example, if we have two bits here, actually, let me, let me do, let me do a</p>



<p class="wp-block-paragraph">sequential counter. Cause I think that&#8217;s more fun. I&#8217;m counting right now from one to a three</p>



<p class="wp-block-paragraph">or a actually, I do that in the last one. I started with zero. I hope let&#8217;s count from zero</p>



<p class="wp-block-paragraph">to three. So zero and then one and then two and then three. So I&#8217;m counting in binary.</p>



<p class="wp-block-paragraph">two input bits and we&#8217;re going to do a nor then the first thing we probably want to do is take</p>



<p class="wp-block-paragraph">the or operator so that would be a zero here i&#8217;ll just put or in parentheses just to let you know</p>



<p class="wp-block-paragraph">that this is kind of a nice first step you could memorize nor if you wanted to but i don&#8217;t i don&#8217;t</p>



<p class="wp-block-paragraph">really remember how to do it without doing these steps so uh it&#8217;s going to be ones for everything</p>



<p class="wp-block-paragraph">else because in the or you get a one if either of those is a one and then uh the next step is you</p>



<p class="wp-block-paragraph">the or i&#8217;ll just put nor here just to let you well just to let you know that you&#8217;re uh well i</p>



<p class="wp-block-paragraph">don&#8217;t know if i put nor then it kind of sounds like i&#8217;m norring that one bit doesn&#8217;t it so maybe</p>



<p class="wp-block-paragraph">here i&#8217;ll say uh not just to let you know that this is just one step against the previous bit</p>



<p class="wp-block-paragraph">so the knot is uh just going to be an inversion and so the nor of zero zero is one the nor of zero</p>



<p class="wp-block-paragraph">nor of 1 1 is 0 and that&#8217;s how you do a nor and all of these logical or bitwise</p>



<p class="wp-block-paragraph">operators can be used in circuits and circuit design and just you know other</p>



<p class="wp-block-paragraph">types of logical operations I&#8217;m gonna move on let&#8217;s see the next one is gonna</p>



<p class="wp-block-paragraph">be XOR that I wanted to talk about in this video so what is XOR it just means</p>



<p class="wp-block-paragraph">exclusive or so it&#8217;s a little bit more complicated than or this is actually a</p>



<p class="wp-block-paragraph">one because it has a history with neural networks. When you have a neural network that does not have</p>



<p class="wp-block-paragraph">more than one, or sorry, if you have a neural network that does not have any hidden layers,</p>



<p class="wp-block-paragraph">like if you just have an input layer and an output layer, then the neural network should</p>



<p class="wp-block-paragraph">actually not be able to solve XOR. It should not be able to learn it. You have to increase the</p>



<p class="wp-block-paragraph">topology of the neural network in some way, make it a little bit more complicated. For example,</p>



<p class="wp-block-paragraph">one or more middle layers between the input and the output layers. If you understand neural</p>



<p class="wp-block-paragraph">networks, it&#8217;s just kind of fun to know, oh, XOR stumps a shallow network and kind of starts to</p>



<p class="wp-block-paragraph">prove that deep networks might be a little bit smarter or deepish at least. Okay. So XOR,</p>



<p class="wp-block-paragraph">let&#8217;s start off by counting here. I&#8217;m going to do zero and zero, and then this is the number one,</p>



<p class="wp-block-paragraph">and this is the number two, and this is the number three. And exclusive OR just basically means</p>



<p class="wp-block-paragraph">just basically means an or but if both of the bits are one then it&#8217;s a zero so that means</p>



<p class="wp-block-paragraph">either of the bits can be a one to produce a one but it must be exclusive the bit that is a one</p>



<p class="wp-block-paragraph">can&#8217;t also be next to another bit that&#8217;s a one so let me show you so in is in a double zero</p>



<p class="wp-block-paragraph">the answer is just going to be a zero in a zero and one the answer is going to be a one in a one</p>



<p class="wp-block-paragraph">exclusive, the one is it has a, it has a buddy or a partner.</p>



<p class="wp-block-paragraph">It&#8217;s not an exclusive one.</p>



<p class="wp-block-paragraph">So we&#8217;ll say that that&#8217;s a zero.</p>



<p class="wp-block-paragraph">So that&#8217;s the XOR.</p>



<p class="wp-block-paragraph">I don&#8217;t know.</p>



<p class="wp-block-paragraph">You could put like a, a, a not on top of that or an and on top of that or whatever</p>



<p class="wp-block-paragraph">you wanted to do.</p>



<p class="wp-block-paragraph">And we can make stuff that&#8217;s a lot more complicated, but these are the basics of</p>



<p class="wp-block-paragraph">or and not XOR and NOR as bitwise operators.</p>



<p class="wp-block-paragraph">So thank you for watching this video.</p>



<p class="wp-block-paragraph">That&#8217;s all I have to say for now.</p>



<p class="wp-block-paragraph">See you in the next one.</p>



<p class="wp-block-paragraph">Hope you learned a little bit and had a little bit of fun.</p>



<p class="wp-block-paragraph">I&#8217;m out.</p>



<p class="wp-block-paragraph">social media website that you&#8217;re looking at right now it would really mean the world to me and it&#8217;ll</p>



<p class="wp-block-paragraph">help make more videos and grow this community so we&#8217;ll be able to do more videos longer videos</p>



<p class="wp-block-paragraph">better videos or just i&#8217;ll be able to keep making videos in general so please do do me a kindness</p>



<p class="wp-block-paragraph">and uh and subscribe you know sometimes i&#8217;m sleeping in the middle of the night and i just</p>



<p class="wp-block-paragraph">wake up because i know somebody subscribed or followed it just wakes me up and i get filled</p>



<p class="wp-block-paragraph">with joy that&#8217;s exactly what happens every single time so you could do it as a nice favor to me or</p>



<p class="wp-block-paragraph">it as a nice favor to me or you could you could troll me if you want to just wake me up in the</p>



<p class="wp-block-paragraph">middle of the night just subscribe and then i&#8217;ll i&#8217;ll just wake up i promise that&#8217;s what will</p>



<p class="wp-block-paragraph">happen also uh if you look at the middle of the screen right now you should see a qr code which</p>



<p class="wp-block-paragraph">you can scan in order to go to the website which i think is also named somewhere at the bottom of</p>



<p class="wp-block-paragraph">this video and it&#8217;ll take you to my main website where you can just kind of like see all the videos</p>



<p class="wp-block-paragraph">i published and the services and tutorials and things that i offer and all that good stuff and</p>



<p class="wp-block-paragraph">if you have a suggestion for uh uh clarifications or errata or just future videos that you want to</p>



<p class="wp-block-paragraph">see please leave a comment or if you just want to say hey what&#8217;s up what&#8217;s going on you know</p>



<p class="wp-block-paragraph">just send me a comment whatever i also wake up for those in the middle of the night i get i wake up</p>



<p class="wp-block-paragraph">in a cold sweat and i&#8217;m like it would really it really mean the world to me i would really</p>



<p class="wp-block-paragraph">appreciate it so again thank you so much for watching this video and um enjoy the cool music</p>



<p class="wp-block-paragraph">the cool music as I fade into the darkness which is coming for us all.</p>



<p class="wp-block-paragraph">Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/master-bitwise-operators-or-and-not-xor-nor-for-beginners/">Master Bitwise Operators: OR, AND, NOT, XOR, NOR for Beginners</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/master-bitwise-operators-or-and-not-xor-nor-for-beginners/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
