Adding in binary

Learn this with friends

MathsAlgebra (all content)2:483 check-ins

About this video

Sal adds the binary numbers 1011 and 111 using the standard column addition method, carrying whenever a column adds to 2 (10 in binary) or 3 (11 in binary). The answer is 10010, which he checks by converting: 11 + 7 = 18.

You'll be able to

  • add multi-digit binary numbers using column addition with carrying.
  • write 2 and 3 in binary (10 and 11) and use them when carrying.
  • check a binary sum by converting the numbers to decimal.

Key words

binary
Base 2: numbers written with only the digits 0 and 1.
standard algorithm
The usual column-by-column method for adding, working right to left and carrying.
carry
Moving a 1 to the next column on the left when a column's total is too big for one digit.
Transcript

Let's see what it's like to add multi-digit numbers in binary. So let's say I had the number one, zero, one, one. And to that I wanted to add the number one, one, one. What is that going to be? And I encourage you to pause this video, and try to work through it on your own.

So the key here is this is just a standard algorithm, and we're adding numbers. But remind yourself you're only restricted to the zero and one digits. So let's do that. So we have one plus one. Well, you might say that's two but you can't write a two here. We can only write a zero or a one.

And we have to remind ourselves that two in decimal is represented as one zero in binary. It's one two and zero ones. So you write the zero, zero ones, and one two. You essentially carry the one. And now you have one plus one, plus one. Well that's going to be three, but you can't write three.

Once again, three in decimal is equal to one one in binary. It's one two, plus, one one is three. And so you just have to realize that. So one plus one plus one is three, which in binary is one one. So you write one in the ones place and then you carry it. And then we want to add what we're doing in the fours place.

And over here, I have a one and a one, which is going to be two which we already know we represent as one zero. So you write zero here and then you carry the one. And then once again, one and one is two. Which is one zero in binary, and we're done. We just added these numbers.

Now, you might be saying, "Hey, let me make sure this actually makes sense." And we can verify that this actually makes sense by thinking about what these numbers are. Remember, this is going to be this number right over here. If we wanted to think of it in decimal.

It's going to be one plus two, plus not four but plus eight. So this is 11 if we were to write it in decimal. And this right over here is one plus two plus four. Which is equal to seven if we were to write it in decimal. And now what's this right over here? This is equal to one two.

This is four, eight, 16. So and this right over here. So we have one 16 plus one two. Is going to be equal to 18 if we write it in decimal. And we see that, 11 plus seven is indeed equal to 18. 11 plus seven is indeed equal to 18.

Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.