Main content
Current time:0:00Total duration:4:20

Video transcript

- I now want to show you that the standard algorithm for multiplying numbers can also be used, it's not just limited to base 10, it can also be used, frankly it can be used in any base, but we're going to do it in base two. And base two is especially fun, because you essentially have only to know your multiplication tables through one. So you just have to know that zero times zero is zero, one times zero is zero, and that one times one is one. And then you're ready to go, you're ready to multiply in base two. So let's do that. So let's say we have... Let's say we take nine, so let's see, nine is going to be one eight zero fours, zero twos and one. So this is nine, right over here, represented in base two. And let's say we were to multiply that times seven, so we should, obviously, if we know our multiplication tables we should get 63. So seven is one; actually I'm going to put a zero, seven would be one one one, but that's a little bit boring so let's instead do nine times five, which we know should be 45. So this is one four, no twos, and one one. So four plus one is going to be five. So this is nine times five and we're doing it in base two. So once again, same algorithm. And actually, before I do it, I encourage you to just pause the video, and try to use the same algorithm that you've used for base ten multiplication, use the same algorithm here and let's see if we actually do get that nine times five is 45. So I'm assuming you've had a go at it, let's work through it together. So let's start right over here in the ones place. So we multiply, one times one is one, one times zero is zero, one times zero is zero, one times one is one. Then, we can go to the twos place and since we're multiplying all of this times the twos place, we can throw a zero right over here. But, of course, zero times each of these is just going to be a bunch of zeros, you know, zero times one is zero, zero times zero is zero, zero times zero is zero, zero times one is zero. So I really didn't have to write that, but I'm just doing it so that you see that I'm using the standard algorithm. And then, we go to the fours place. And since we're in the fours place, let's put some zeros here. So zero, zero. We're essentially talking about a certain number of fours, not a certain number of ones. So one times that is just going to be one, zero, zero, one. And now we're ready to add. Now we are ready to add. So one plus a bunch of zeros is one, a bunch of zeros, that's going to be one, one plus a bunch of zeros is one, zeros, and one. And we're done. And obviously if we had more than one one in any of these places right over here, then we might have had to carry a one. But we saw that, when we added numbers in binary. Well, let's actually verify that this is the number that we would expect it to be. Remember, this right over here is the ones place- so let's see, this is ones, fours, let me write it down, this is ones, twos, fours, eights, 16s and 32s. So we have one 32, so it's going to be 32, plus one eight, and once again, we only have to do this for ourselves because we're so used to thinking in base 10. If we were thinking in base two, you'd say, "Oh, I know what this number is," and you would have some name for it, probably different than 45, because 45, the name essentially is kind of a base 10 name and we'd probably have better names in terms of base two. Somebody should actually do that, that would be a fun project. So let's see, we have 32, plus eight, plus four, plus four, plus one, plus one. Which is indeed equal to 45.