Learn in your language
Skip to content
IGCSE · Cambridge (CIE) · 0478

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.

Cambridge IGCSE Computer Science 0478 · Data representation · 2026–2028 Version 6 · 1.1

This sequence follows Cambridge IGCSE Computer Science 0478, 2026–2028 syllabus Version 6. 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.

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?

Put the idea to work

Worked example

Add 00110110₂ and 00010101₂ in an 8-bit register.

Show the worked solution
  1. From right to left, 0+1=1; continue carrying when two 1s meet.
  2. The full sum is 01001011₂.
  3. 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.

1 · Guided

Add 00101101₂ and 00011011₂.

Give me a hint

Add the columns and keep any carry.

Compare my reasoning
  1. 45+27=72.
  2. 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
2 · Independent

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
  1. 240+32=272.
  2. 272 is greater than 255.
  3. 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
3 · Transfer

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
  1. 248+15=263.
  2. 263 exceeds 255, so an 8-bit register overflows.
  3. 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
Recall without your notes

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.

Keep learning Computer Science

Course scope and assessment

165 original lessons map the listed objectives across all 10 main topics in the 2026–2028 Version 6 syllabus, with worked explanations and guided, independent and transfer practice. This is mapped teaching coverage, not proof of full exam readiness. Three earlier starter lessons remain available but are not counted as syllabus-mapped teaching. Practical programming experience in an executable browser workspace, full timed-paper practice, human subject-teacher review and the separate 2029–2031 syllabus remain outstanding. Practice is self-checked and does not award an official Cambridge grade.

StudyForA · Learn with understanding

Original teaching content and links to official sources. Check your exam year and qualification before using a resource.