Add 8-bit binary integers and detect overflow
Add positive binary integers column by column and identify when an 8-bit register cannot hold the result.
Exam scope and assessment notes
This sequence follows Cambridge IGCSE Computer Science 0984, 2026–2028 syllabus Version 4. It covers subject content sections 1.1–1.3 only. The separately published 2029–2031 syllabus is not mapped here. Practice is original, self-checked and does not award an official Cambridge grade. Full timed papers and human subject-teacher review remain outstanding. Cambridge states that 0984 has the same 2026–2028 subject content as 0478, with 9–1 grading. In June and November, Cambridge lists 0984 in Administrative zone 3 and for centres in Oman and the UAE. Confirm availability for your centre and exam series with Cambridge International. The separately published 2029–2031 syllabus changes to Python 3 only and removes pseudocode; this 2026–2028 route does not cover those changes.
Before you begin
- No programming language is required. Be comfortable with place value and multiplication; each lesson introduces the computer-science notation it uses.
Work on paper. Try each question before revealing help, and explain why your method works.
Quick readiness check
What is 1+1 in binary?
What you will learn
- Add two positive 8-bit binary integers
- Track carries between columns
- Explain overflow when the result exceeds 255
Carry in base two
Add from the least significant bit. 0+0 gives 0; 0+1 gives 1; 1+1 gives 0 and carries 1; 1+1+1 gives 1 and carries 1.
Apply and check the rule
An 8-bit unsigned register can hold 0 through 255. If addition needs a ninth bit, the mathematical answer is outside that fixed range and an overflow error occurs. The stored low eight bits alone do not show the full result.
Pause and explain
An 8-bit unsigned addition produces 1 00000000. What does the leading 1 show?
Worked example
Add 00110110₂ and 00010101₂ in an 8-bit register.
Show the worked solution
- From right to left, 0+1=1; continue carrying when two 1s meet.
- The full sum is 01001011₂.
- It has eight bits and equals 75, so no overflow occurs.
Answer 01001011₂; no overflow
Try a topic test
Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.
Test this topic →From guided practice to a new situation
Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.
Add 00101101₂ and 00011011₂.
Give me a hint
Add the columns and keep any carry.
Compare my reasoning
- 45+27=72.
- 72 in eight-bit binary is 01001000.
01001000₂; no overflow
Look for these in your work
- Sum equals 72
- Eight-bit pattern correct
- No overflow stated
Add 11110000₂ and 00100000₂ in an 8-bit register. Does overflow occur?
Give me a hint
Convert the operands or inspect the ninth carry.
Compare my reasoning
- 240+32=272.
- 272 is greater than 255.
- The full binary sum is 1 00010000, which needs nine bits.
Yes. The mathematical result is 272, outside the 8-bit unsigned range.
Look for these in your work
- Sum 272
- 8-bit limit applied
- Overflow explained
A counter stores 248 and adds 15. Explain what the 8-bit register can and cannot report.
Give me a hint
Compare the mathematical sum with the register's maximum.
Compare my reasoning
- 248+15=263.
- 263 exceeds 255, so an 8-bit register overflows.
- The low eight bits would be 00000111, but that wrapped pattern is not the correct mathematical result.
The correct sum is 263, which cannot be represented in 8-bit unsigned form. A carry is lost if only the low eight bits are kept, so the register cannot report 263 correctly.
Look for these in your work
- Correct sum
- Limit and overflow stated
- Wrapped bit pattern interpreted carefully
Common mistakes
- Dropping a carry before checking whether a ninth bit was produced
- Calling every carry an overflow; an internal carry is normal
What can you explain now?
What happens when 11111010₂ and 00001010₂ are added in an 8-bit unsigned register?
Compare with the explanation
The sum is 260, so the register overflows
260 exceeds the 8-bit maximum 255, even though the low eight bits are 00000100.
After trying it yourself, choose your next review. This is your self-assessment.
Your review choice appears on Today. Sign in to sync it across devices.
Make it stick
How is a ninth carry different from the ordinary carries inside an 8-bit addition?
If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.