How do I add binary digits together?
Binary addition is straight forward – all we need to do is follow these simple rules:0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10
1 + 1 + 1 = 11
Binary addition is often done in multiple columns, and we always start with the column on the right and move to the next column on the left.
1 | 0 | |
---|---|---|
+ | 0 | 1 |
= | 1 | 1 |
Explanation | (1+0=1) | (0+1=1) |
If we get a 1 + 1 our rules state, we get 10. We should carry the 1 over to the column on the left and include this when adding up the next column. The 0 will stay in the current column.
Example
0 | 1 | |
---|---|---|
+ | 0 | 1 |
= | 1 | 0 |
Carry | 1 | |
Explanation | (0 + 0 + 1 = 1 the 1 is our carry from the column on the right) | (1 + 1 = 10 the 1 is carried to the next column and the 0 is placed in the current column) |
Example 2
1 | 1 | ||
---|---|---|---|
+ | 0 | 1 | |
= | 1 | 0 | 0 |
Carry | 1 | 1 | |
Explanation | (1 + 0 + 1 = 10 the 1 is carried to the next column on the left and the 0 is placed in the current column) | (1 + 1 = 10 the 1 is carried to the next column on the left and the 0 is placed in the current column) |
If we get a 1 + 1 + 1 (because of a carry) our rules state we get 11. We should carry the 1 over to the column on the left and include this when adding up the next column. The 1 will stay in the current column.
Example
1 | 1 | ||
---|---|---|---|
+ | 1 | 1 | |
= | 1 | 1 | 0 |
Carry | 1 | 1 | |
Explanation | (1 + 1 + 1 = 11 the 1 is carried to the next column on the left and the 1 is placed in the current column) | (1 + 1 = 10 the 1 is carried to the next column on the left and the 0 is placed in the current column) |
Add the following 4 digit binary numbers together:
=