Adding binary numbers
You add as in long addition in decimal, except that carries already occur at 2.
Rules
- 0 + 0 = 0, 0 + 1 = 1
- 1 + 1 = 0, carry 1
- 1 + 1 + 1 = 1, carry 1
Your turn
Three problems on this topic. Spaces don’t matter.
- 1 · Binary addition
- 2
- 3
Add the two binary numbers.
01111100 + 00111001
Sum (binary)
Worked example
Add the two binary numbers.
00111111 + 01100011
Worked solution
- 163 + 99 = 162
- 2Digit by digit from the right: 1 + 1 = 0 carry 1, 1 + 1 + 1 = 1 carry 1.
- 3= 10100010
Typical mistake: Don’t forget the carry for 1 + 1 + 1: 1 stays and 1 carries over.
Common questions
What happens to the last carry?
It becomes a new top digit; with a fixed bit width it is dropped.
