Number Systems · Cambridge syllabus 1.1 · Lesson 3 of 5
Binary Addition and Overflow
Binary addition uses the same carry principle as denary addition: 1 + 1 gives 10₂, so write 0 and carry 1. An unsigned eight-bit register holds 0–255. A ninth result bit cannot fit and signals overflow.
By the end, you can
- Add two positive 8-bit binary integers.
- Apply binary addition rules.
- Identify the result of binary addition within an 8-bit register.
- Understand what an overflow error is.
- Explain why overflow occurs.
- Recognise that an 8-bit unsigned register can represent values from 0 to 255.
- Identify when a calculation produces a value outside the available range.
Binary addition
Binary addition works column by column from the right, exactly like denary, with four rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 0 carry 1. The fifth case, 1 + 1 + 1 from a carry, gives 1 carry 1.
Write the carries above the next column as you go, and keep the columns lined up — most mistakes here are alignment mistakes rather than arithmetic ones.
Check by converting both numbers and the answer to denary. If the sum does not match, the error is usually a dropped carry.
Worth remembering
- 1 + 1 = 0 carry 1; 1 + 1 + 1 = 1 carry 1.
- Work right to left, writing carries above the next column.
Overflow
A computer stores numbers in a fixed number of bits — usually 8 for these questions. Overflow happens when the result of a calculation needs more bits than that.
Adding 11010110 and 10110101 gives a nine-bit answer. The eight rightmost bits are stored and the ninth, the carry out of the leftmost column, has nowhere to go. In denary, 214 + 181 = 395, but the stored result is 139 — not merely imprecise, but wrong.
So the definition to give is that overflow occurs when a result is too large for the number of bits available, and the consequence is an incorrect answer, because the most significant bit is lost.
Real systems handle it by detecting the carry out and raising a flag, which the program can check, or by using more bits. Unnoticed overflow has caused real failures, which is why it is worth recognising rather than treating as a curiosity.
Worth remembering
- Overflow: the result needs more bits than are available.
- The carry out of the leftmost column is lost, so the stored answer is wrong.
Worked example
11111111₂ + 00000001₂ = 1 00000000₂. An eight-bit register retains 00000000 and loses the carry.
Practice
Warm-up · not marked
Check your understanding
Answer in your own words, then compare with the worked answer. Nothing here is saved or scored.
Worked answer
The sum is 300. Since 300 exceeds 255, overflow occurs; the low eight bits represent 300 − 256 = 44.
Check your method, units and explanation against it.
Marked practice
Set 1 of 4 · easiest first · Checked as you go, with the worked answer. Sign in or create a free account to save your progress.