 All right, I'm gonna try to make this quick So yeah, this is This is a video on how to do Arithmetic with Boolean algebra sounds pretty Pretty smart Okay, first To not waste any of the people who already know This and just want I just want the equation It's not really an equation, but On how to do it. It's like this The new number you'll get will be n1 Wait, I think I forgot something okay, oh Let's just I have confirmed this Method works and this is actually how They do it in Google images Whatever the first thing you will get is Is that you add the you do X or the first two digits and then X or again with the previous carry bit? And how you get the next carry bit is a little bit more complicated, but you get X or these first two numbers I Should have just called them X and Y and see, you know And one X or and two and then you do and those two or you do an or of n1 and n2 I'll go into how I found this right now, but first we need to Look at what these dang Boolean algebra is what does mean? Pretty simple. You have two inputs. It doesn't matter what they are. They could be zero one a and be X or Y true false. Yes. No, it doesn't matter. They will return They will return a single A new value based on two or one in the case of not that you will need As you saw in the previous thing I just showed and or an X or are gonna be the only Things that matter and an X or are really important or is Side thing I'll explain later. I'll explain Whatever you let me first describe how and works and well It's only one when a and B are equal to one. That's why it's called and or is only one when B or a is one If both are zero, then it's zero and X or is only one when X or is only one when when a and B are different inputs and It's zero when a and B are the same. Okay That's all you need to know Let's go into Boolean adding adding numbers adding binary numbers Works as simple in my case. I'm going to do five plus six I'll just show you the process of adding binary So One plus zero. That's one Zero plus one. That's one One plus one. That's two, but binary does not have does not have two It can only do one or zero. So you would have to do a carry This would be zero and I have one and that will give you that's 11 Okay Hopefully now that you understood this we can begin to translate that into actually We can begin to translate that into normal Not translate, but you know what I mean put it through both Boolean operators. Yeah, that's what I We can say the first number is X Y Z and the second is X1 Y1 and Z1 Okay, an interesting property that you might find is That if you add if the first two are the same whether they be zero zero or one one You'll always get zero in the case of one one. You'll have a carry But if both of them are the same now be zero, but if they are different that will give you one This is why you need X or You do Let's do X in this case X X one You do X X or I should probably shouldn't have used X or It's a tongue twister X X or X one Okay That will look like this Okay, that gives you that gives you your new number What's the carry bit then? well This is where and comes in the carry bit if you notice You only get you only get a carry bit if act if the first digit and the second digit are One so that fits with ant one and one that will give you one so Like I did here. Let me bring all this back I don't know. I deleted it. Okay, so to get this new thing You would need to put that put it through ant. I believe that is the gate for ant. Yeah, and so it would be X X one There you go That's your carry bit But this is not complete. This is only true for the first two It does not account for the previous carry bit In the case of the first of the first thing the carry bit will be Zero, but we need to account for it with with a new so we can still we still keep this Probably I ought to make it nicer We keep we keep the previous day What I'm trying to do this quickly. I got other stuff to do Hey history Yeah, so you get X X one you put these two to X or But to get to account for the carry bit You will need to Okay, first let's cut a carry bit C Now This will be your new number Let's call this X to but you can but with a new number you are gonna have to add it to see And see well, you just do that by adding by doing X or again Okay, and You can also Try to find the carry bit between X C and X to this new one And you do it by the same thing so you do C and X to Because only if those two are one and you get a new one Ah, it's ugly now this doesn't look pretty But You make do Okay, this is going quicker than the last one Oh What's next? Oh, yeah, now I have to explain why you do or here and There's a pretty simple explanation for that notice how You can only get In let's look at this case Does it only let's add let's add these two first and this top one is a cave Notice how you'll have to notice how you can't have a carry bit with these two and Then add C and then get a carry bit with those two these two These two cannot be one at the same time Now what is that? Pretty simple Okay, let's do the case where they're all equal one You add these two first. Okay, you get a carry bit here So X and X one X and X one yeah are one So you get a carry bit and you get a zero down here okay, well then now you have to add the carry bit and That will just give you one you do the carry bit X or X to that's one and You do it and well that gives you zero Zero and one that's zero so that goes here. They can't be the same so let's say we do it the other way then Let's say put this here zero one Okay Well, you add these two you get one, but you get no carry bit. So this would be equal to zero right here but Once you add the carry bit you get a zero get a zero again, but you also get another a new carry bit so So the reason why we do or is Well, if the if this one is equal to zero or this one is equal to one you still get one and If it's flipped around you also still get one But if both are zero, then you get zero One and one does not matter Because as we just as we just said it cannot be the same Boom, that's the fastest. I've done this video. Let's see my time 11 I thought it'd be more like seven minutes You record for me Let's go back to the original Expression this is There is Ah, I forgot to do the black box thing or show you the table Whatever you probably got this the table the table would look like this You know At all three zeros you get zero zero zero zero zero zero one zero. What are you you understand? All right, I really didn't eat this table to show you but I did it to understand myself So that's what matters The original the original draft I had was well then you would take you take this big Box that will give you and then you would insert these first the first two Digits and you'd get a carry bit and you'd get a new number and then you put it again through an adder Okay, you get a carry But here's the thing You'd also need to oh the new number the new number doesn't go through the adder through the new adder But you do get a carry bit so the carry bit would have to go through the adder Why is this? Also do this one X Y now why So so we would also need a carry bit here so we could have a repeating series This I'm not gonna I'm not gonna do this too long. So We will put this all the way at the end now you would have and and to and see And it will look like this Yeah, so you would have to have repeating Repeating these things have to repeat, you know, you keep putting them and the new The new things will go here You could you could see the pattern right and each one of these are another digit so I Think that's pretty much it. Yeah, and I checked with and I and I looked this up and My methods seem to be the one that worked I'm proud of myself, but this is surprisingly easy It only took like 15 minutes, I don't know why the teacher didn't teach this That circuit sure does look ugly I'm gonna look it up again See It does Yeah, this is the one. This is the one I drew some carry out. I think that's what that means again, yeah Uh, this is the original thing, so I guess it's called the half-hatter I found this an interesting. I think it's really clever Because you because you can keep doing that. I think that's all sorry for taking too long and making this video