If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Algebra (all content)

### Course: Algebra (all content)>Unit 1

Lesson 14: Binary and hexadecimal number systems

## Want to join the conversation?

• Did anyone else get kind of confused when Sal added 1 + 1 in the one's place, to get 2 and then carried that 2 into the 2's column by adding another 1, making 1 + 1 + 1, which he then added to get"3", which he ""carried" by writing 3 as 11? I was thinking that having 3 ones in the 2's column would be added as 2 + 2 + 2 = 6, which equals 1 in the 4's place and 1 in the 2's place. You get the same answer (6 = 11, in terms of 4's and 2's), but it just seemed kind of confusing to me the way he did it.
• He converted the decimal 2 to the binary 10 and then carried the one. In the 2's column he added three 1's to get the decimal 3 which is binary 11. He again carried the 1 from 11 to the 4's column. Keep adding this way by carrying digits in binary the same way you did in decimal.
• Is there actually subtraction within binaries?
• Yes, like addition, it's the same as with decimal, only just using the numbers 0 and 1.

For 1011 - 111, you would start with the rightmost digits and do 1 - 1 =0. Then 1 -1 =0 for the second digit. For the third digit, you have 0 - 1, which you can't do, so you have to borrow a 1 from the forth digit to get 10 - 1, which is 1 (it's the equivalent of 2 - 1 = 1). So the final answer is 100. 1011 - 111 = 100, and indeed, 11 - 7 = 4.
• Then what if i add 101 + 111 + 101 + 111 = ? 4 in binary is what number?
• I wanted to understand how the borrow works when there is nothing ot borrow . Say I want to subtract 0110 from 1000 (1000 - 0110) .

First Step : 0 - 0 = 0 : This is fine.
Next : 0 - 1 = carry from next digit ,it is a 0 so carrry from next .So 10 - 1 = 1 . This is also fine.

But now what next since there is nothing to borrow and we are left with 0 - 1 .

Can some explain?
(1 vote)
• See you get a nine over there so convert 9 to decimal and solve . just do it like decimal borrowing
(1 vote)
• how do I solve this 00101110 + 11010111 = I got 100000101 is that right?
• When he said 1 +2 + 4 = 7 in binary, how did he get 7? Can someone please help me?Thank you
• Well, he got the 1, 2, and 4 from the place values of the number. Remember, in binary, the place values go: ones, twos, fours, eights, sixteens, etc. Thus, as there was ONE ones, ONE twos, and ONE fours, he go t the resulting 1,2,4. Then, if he simply adds these numbers, he should get the original decimal number, which is 7. Not sure if I explained this super well, but I think that is the basic idea.
(1 vote)
• Can someone explain me how he got the decimal numbers at the end?
for example 1011 stands for 1+2+4 = 7 (dec)