Binary addition works like denary addition but uses only 0s and 1s. There are only four rules to remember:
| Addition | Result | Carry |
|---|---|---|
| 0 + 0 | 0 | 0 |
| 0 + 1 | 1 | 0 |
| 1 + 0 | 1 | 0 |
| 1 + 1 | 0 | 1 (carry 1) |
| 1 + 1 + 1 (with carry) | 1 | 1 (carry 1) |
The key rule: 1 + 1 = 10 in binary (denary 2). You write 0 and carry 1 to the next column.
Add these two 8-bit binary numbers:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|---|---|---|---|---|---|---|---|---|
| Number 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
| Number 2 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 |
| Carry | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
| Result | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
Check: 00110101 = 53, 00011011 = 27, 53 + 27 = 80 = 01010000 ✓
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|---|---|---|---|---|---|---|---|---|
| Number 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 |
| Number 2 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 |
| Carry | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| Result | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 |
Check: 202 + 44 = 246 = 11110110 ✓
Overflow occurs when the result of a binary addition is too large to be stored in the available number of bits. With 8 bits, the maximum value is 255 (11111111). If the result exceeds 255, a carry is generated beyond the MSB — this carry is lost (as there are no more bits to hold it), and the result stored is incorrect.
11110000 = 240, 00110000 = 48. 240 + 48 = 288 — but 288 > 255, so overflow occurs.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | Carry out | |
|---|---|---|---|---|---|---|---|---|---|
| Number 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | |
| Number 2 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | |
| Result | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 (lost!) |
The 8-bit result is 00100000 = 32 — this is wrong because the carry bit has been lost. This is overflow. The correct answer (288) cannot be stored in 8 bits.
8 questions · 20 marks · Show all working including carry bits
| Term | Definition |
|---|
10 questions · 10 marks · 10 minutes