Adding binary numbers, and overflow Cambridge IGCSE Computer Science revision
Not started
Learn it
In plain words
Binary numbers are added in columns from the right, just like denary, but you carry whenever a column reaches 2.
A register has a fixed number of bits. If the answer is too big to fit, the extra bit has nowhere to go. That is an overflow error.
4 things to know
- The four rules: 0 + 0 = 0. 0 + 1 = 1. 1 + 1 = 0 carry 1. 1 + 1 + 1 = 1 carry 1.
- Work from the right-hand column to the left, writing each carry above the next column.
- An 8-bit register can hold nothing larger than 255. If the sum is more than 255 it needs a ninth bit, and an overflow error occurs.
- Every computer has a limit like this, for example 16 bits. An overflow error happens whenever a result is outside the limit.
Worked example
Add the 8-bit binary numbers 01101011 and 00111010.
- From the right: 1 + 0 = 1. 1 + 1 = 0 carry 1. 0 + 0 + 1 = 1. 1 + 1 = 0 carry 1.
- Carrying on: 0 + 1 + 1 = 0 carry 1. 1 + 1 + 1 = 1 carry 1. 1 + 0 + 1 = 0 carry 1. 0 + 0 + 1 = 1.
- The answer is 10100101.
- Check in denary: 107 + 58 = 165, and 10100101 = 128 + 32 + 4 + 1 = 165.
Tips and tricks
- Show the carries. They earn the working mark even if a later column goes wrong.
- Check your answer by converting all three numbers to denary. It takes a few seconds.
- To explain overflow, give both halves: the result is greater than 255, and so it cannot be stored in 8 bits.
It lands in your notebook with its questions as flashcards.
Adding binary numbers, and overflow: 5 questions and answers
These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.
In binary, what is 1 + 1?
There is no digit 2 in binary. Write 0 and carry 1.
In binary, what is 1 + 1 + 1?
That is 3 in denary, which is 11: write 1 and carry 1.
What is 00110101 + 00011011?
53 + 27 = 80, and 80 = 64 + 16.
When does an overflow error occur in an 8-bit register?
A result above 255 needs a ninth bit, and there is nowhere to put it.
Which of these 8-bit additions causes an overflow error?
129 + 128 = 257, which is more than 255. The others give 128, 30 and 128.
Quiz
5 questions
Tap an answer and you’ll see straight away whether it’s right, and why.
Worksheet
2 questions, 5 marks. Write your answers on paper, then check them.
Adding binary numbers, and overflow
Cambridge IGCSE Computer Science 0478 · 5 marks · papermunch.org
Name ______________________________ Date ______________
Add the binary numbers 01011001 and 00100110. Give your answer in binary.[2]
Show answerHide answer
01111111. (89 + 38 = 127. No column produces a carry.)
Add the 8-bit binary numbers 10110110 and 01100001, and explain why the result cannot be stored in an 8-bit register.[3]
Show answerHide answer
100010111. The result (279) is greater than 255, so it needs nine bits. This is an overflow error.
Answers: Adding binary numbers, and overflow
- 1. 01111111. (89 + 38 = 127. No column produces a carry.)
- 2. 100010111. The result (279) is greater than 255, so it needs nine bits. This is an overflow error.



