Adding in Binary

You already know how to add numbers in denary (base 10). You start from the rightmost column and work your way left, carrying over when a column adds up to 10 or more. Binary addition works in exactly the same way — but because binary only has two digits (0 and 1), you carry whenever a column adds up to 2 or more.

Think of it this way: in denary, when you add 7 + 5, you get 12. You write down the 2 and carry the 1. In binary, when you add 1 + 1, you get 10 (which is “two” in binary). You write down the 0 and carry the 1. That is the entire foundation of binary addition.

Here are the five rules you need to memorise:

AdditionResultWhat You WriteWhat You Carry
0 + 000Nothing
0 + 111Nothing
1 + 011Nothing
1 + 11001
1 + 1 + 11111

The last two rules are the ones students most often forget. Let us break them down:

Key Concept: The Carry A carry in binary addition works just like a carry in denary addition. Whenever the sum of a column is 2 or more, you must carry a 1 to the next column on the left. Always work from right to left, just as you would in denary. Write the carry row above the numbers so you can keep track of it — examiners love to see this, and it helps you avoid mistakes.

Worked Examples

Let us work through three examples step by step. For each one, we add from right to left, just like denary addition, and we always show the carry row above.

Example 1: 01101011 + 00110101

First, let us confirm the denary values: 01101011 = 64 + 32 + 8 + 2 + 1 = 107, and 00110101 = 32 + 16 + 4 + 1 = 53. We expect the answer to be 107 + 53 = 160.

Binary Addition — Example 1 (107 + 53 = 160)
  Carry:  1 1 1 1 1 1
          0 1 1 0 1 0 1 1   (107)
        + 0 0 1 1 0 1 0 1   ( 53)
        -----------------
          1 0 1 0 0 0 0 0   (160)

Column-by-column working (right to left):

  1. Column 1 (ones): 1 + 1 = 10. Write 0, carry 1.
  2. Column 2 (twos): 1 + 0 + carry 1 = 10. Write 0, carry 1.
  3. Column 3 (fours): 0 + 1 + carry 1 = 10. Write 0, carry 1.
  4. Column 4 (eights): 1 + 0 + carry 1 = 10. Write 0, carry 1.
  5. Column 5 (sixteens): 0 + 1 + carry 1 = 10. Write 0, carry 1.
  6. Column 6 (thirty-twos): 1 + 1 + carry 1 = 11. Write 1, carry 1. Wait — actually 1 + 1 = 10, plus carry 1 = 11. So we write 1 and carry 1.
  7. Column 7 (sixty-fours): 1 + 0 + carry 1 = 10. Write 0, carry 1.
  8. Column 8 (one-twenty-eights): 0 + 0 + carry 1 = 1. Write 1. No carry.

Result: 10100000. Check: 128 + 32 = 160. Correct!

Example 2: 00101100 + 01001110

Denary check: 00101100 = 32 + 8 + 4 = 44, and 01001110 = 64 + 8 + 4 + 2 = 78. Expected answer: 44 + 78 = 122.

Binary Addition — Example 2 (44 + 78 = 122)
  Carry:      1 1 1
          0 0 1 0 1 1 0 0   ( 44)
        + 0 1 0 0 1 1 1 0   ( 78)
        -----------------
          0 1 1 1 1 0 1 0   (122)

Column-by-column working (right to left):

  1. Column 1: 0 + 0 = 0. Write 0.
  2. Column 2: 0 + 1 = 1. Write 1.
  3. Column 3: 1 + 1 = 10. Write 0, carry 1.
  4. Column 4: 0 + 0 + carry 1 = 1. Write 1.
  5. Column 5: 1 + 1 = 10. Write 0 — wait, let us be careful. Actually column 5 is the 16s column: 1 + 0 = 1. Write 1. No carry.

Let us redo this more carefully:

  1. Column 1 (1s): 0 + 0 = 0. Write 0.
  2. Column 2 (2s): 0 + 1 = 1. Write 1.
  3. Column 3 (4s): 1 + 1 = 10. Write 0, carry 1.
  4. Column 4 (8s): 1 + 1 + carry 1 = 11. Write 1, carry 1.
  5. Column 5 (16s): 0 + 0 + carry 1 = 1. Write 1.
  6. Column 6 (32s): 1 + 0 = 1. Write 1.
  7. Column 7 (64s): 0 + 1 = 1. Write 1.
  8. Column 8 (128s): 0 + 0 = 0. Write 0.

Result: 01111010. Check: 64 + 32 + 16 + 8 + 2 = 122. Correct!

Try This: Before looking at Example 3, try adding 11001000 + 01100101 yourself on paper. Work column by column from the right. When you are done, convert your answer to denary and check whether it equals 200 + 101 = 301. What do you notice?

Example 3: 11001000 + 01100101 (Overflow!)

Denary check: 11001000 = 128 + 64 + 8 = 200, and 01100101 = 64 + 32 + 4 + 1 = 101. Expected answer: 200 + 101 = 301.

But wait — the maximum value an 8-bit unsigned binary number can hold is 11111111 = 255. The number 301 is bigger than 255, so it cannot fit in 8 bits. Let us see what happens:

Binary Addition — Overflow Example (200 + 101 = 301)
  Carry: 1 1 1
          1 1 0 0 1 0 0 0   (200)
        + 0 1 1 0 0 1 0 1   (101)
        -----------------
        1 0 0 1 0 1 1 0 1   (301 — needs 9 bits!)

  But we only have 8 bits, so the 9th bit is LOST:
        0 0 1 0 1 1 0 1   = 45   (WRONG!)

  This is an OVERFLOW ERROR.

The true answer is 100101101 in binary, which is a 9-bit number. Since our system only has 8 bits, the leftmost bit (the 1 in the 256s column) is discarded. The computer stores 00101101, which equals just 45 — a completely incorrect answer. This is called an overflow error.

Overflow Errors

An overflow error occurs when the result of a calculation is too large to be stored in the number of bits available. It is one of the most important concepts in binary arithmetic, and exam boards love to test it.

Why Does Overflow Happen?

Every computer system allocates a fixed number of bits to store each number. With 8 bits (one byte), the largest unsigned integer you can represent is:

Maximum 8-Bit Unsigned Value
  1 1 1 1 1 1 1 1
  128+64+32+16+8+4+2+1 = 255

  Maximum value with n bits = 2^n - 1
  For 8 bits: 2^8 - 1 = 256 - 1 = 255

If a binary addition produces a result greater than 255 (for 8-bit), the answer requires a 9th bit. But there is no 9th bit available — so that extra bit is simply lost. The remaining 8 bits give an incorrect, smaller number.

How to Spot Overflow

You can detect overflow in two ways:

  1. The denary check: Convert both numbers to denary. If their sum exceeds 255 (for 8-bit), there will be overflow.
  2. The carry-out check: If there is a carry out of the most significant bit (the leftmost column) — meaning a 9th bit is generated — overflow has occurred.

What Happens When Overflow Occurs?

Real-World Consequences of Overflow

Ariane 5 Rocket (1996): The European Space Agency’s Ariane 5 rocket exploded just 37 seconds after launch. The cause? A 64-bit floating-point number (representing horizontal velocity) was converted to a 16-bit signed integer. The velocity value was too large for 16 bits, causing an overflow error. The guidance system received garbage data, the rocket veered off course, and the self-destruct mechanism was triggered. The rocket and its four satellites — worth over $370 million — were destroyed.

Boeing 787 Dreamliner (2015): The US Federal Aviation Administration issued a safety directive after discovering that a counter in the Boeing 787’s generator control units would overflow after exactly 248 days (231 hundredths of a second) of continuous operation. If all four generators were powered on simultaneously and left running for 248 days, the overflow could cause them to shut down simultaneously, resulting in a total loss of electrical power mid-flight. The fix was simple: restart the generators before the counter overflowed.

Watch Out — Overflow on Exam Papers: If a question asks you to add two 8-bit binary numbers and the result exceeds 255, you must state that an overflow error has occurred. Do not just write the 9-bit answer — explain that the 9th bit is lost, the stored result is incorrect, and this is called an overflow error. This is a common source of lost marks.

Interactive Exercise 1: Binary Addition Practice

Add the two 8-bit binary numbers below. Type your answer as an 8-bit binary number (e.g. 01100100).

Loading...
Score: 0 / 0

Interactive Exercise 2: Overflow Detector

Add the two 8-bit binary numbers below. Enter the 8-bit result and decide whether an overflow error occurs.

Loading...

Does overflow occur?

Score: 0 / 0

Test Yourself

Click on each question to reveal the answer. Try to work it out on paper first — remember to show your carry row!

Q1: Add the binary numbers 00011010 + 00001111. Give your answer in 8-bit binary and check in denary.

Answer:

  Carry:    1 1 1 1 1
          0 0 0 1 1 0 1 0   ( 26)
        + 0 0 0 0 1 1 1 1   ( 15)
        -----------------
          0 0 1 0 1 0 0 1   ( 41)

26 + 15 = 41. The result 00101001 = 32 + 8 + 1 = 41. Correct, no overflow.

Q2: Add 01010101 + 00101010. Does overflow occur?

Answer:

  Carry:
          0 1 0 1 0 1 0 1   ( 85)
        + 0 0 1 0 1 0 1 0   ( 42)
        -----------------
          0 1 1 1 1 1 1 1   (127)

85 + 42 = 127. Result: 01111111 = 127. No overflow (127 ≤ 255). Notice that no carries were needed at all — no column had two 1s!

Q3: Add 11111111 + 00000001. What happens?

Answer:

  Carry: 1 1 1 1 1 1 1 1
          1 1 1 1 1 1 1 1   (255)
        + 0 0 0 0 0 0 0 1   (  1)
        -----------------
        1 0 0 0 0 0 0 0 0   (256 — needs 9 bits!)

255 + 1 = 256. This exceeds 255, so an overflow error occurs. The 9th bit is lost, leaving 00000000 = 0. The answer wraps around from the maximum value back to zero!

Q4: Add 10110100 + 01001011. Does overflow occur? What is the result?

Answer:

  Carry:  1 1 1 1 1 1
          1 0 1 1 0 1 0 0   (180)
        + 0 1 0 0 1 0 1 1   ( 75)
        -----------------
          1 1 1 1 1 1 1 1   (255)

180 + 75 = 255. Result: 11111111 = 255. No overflow! This is the largest possible 8-bit value. One more and it would overflow.

Q5: A computer uses 8-bit unsigned integers. A program tries to store the result of 200 + 200. What value is actually stored, and why?

Answer: 200 + 200 = 400. Since 400 > 255, an overflow error occurs. In binary: 200 = 11001000, and 200 + 200 = 110010000 (9 bits). The 9th bit is lost, leaving 10010000 = 144. So the computer stores 144 instead of the correct answer of 400. Alternatively: 400 − 256 = 144 (the value “wraps around”).

Q6: Explain two ways you can check whether overflow has occurred after adding two 8-bit binary numbers.

Answer:

  1. Denary check: Convert both numbers to denary and add them. If the sum exceeds 255, overflow has occurred.
  2. Carry-out check: Perform the binary addition. If a carry is generated out of the most significant bit (i.e., a 9th bit is produced), overflow has occurred.

Both methods are equally valid in an exam. The denary check is often quicker if you are already comfortable converting.

Q7: Why does the Ariane 5 rocket disaster demonstrate the importance of understanding overflow errors?

Answer: The Ariane 5 rocket exploded in 1996 because a 64-bit floating-point number (representing horizontal velocity) was converted to a 16-bit signed integer. The velocity value was too large for 16 bits, causing an overflow error. This fed incorrect data to the guidance system, causing the rocket to veer off course and self-destruct. The accident destroyed over $370 million worth of equipment. This shows that overflow errors are not just theoretical exam questions — they can have catastrophic real-world consequences. Programmers must always consider the range of values their variables might hold and choose data types with enough bits to store them safely.

Key Vocabulary

Make sure you know all of these terms for your exam:

TermDefinition
Binary Addition The process of adding two binary numbers together column by column, from right to left, following the rules of base-2 arithmetic (where 1 + 1 = 10).
Carry A digit that is transferred to the next column on the left when the sum of a column equals or exceeds the base value. In binary, a carry of 1 occurs whenever a column totals 2 or 3.
Overflow Error An error that occurs when the result of a calculation is too large to be represented in the available number of bits. The extra bit(s) are lost, producing an incorrect result.
Most Significant Bit (MSB) The leftmost bit in a binary number. It has the highest place value (e.g. 128 in an 8-bit number). A carry out of the MSB indicates overflow in unsigned addition.
Least Significant Bit (LSB) The rightmost bit in a binary number. It has the lowest place value (1). Binary addition always starts from the LSB and works leftward.

Exam Tips

Exam Tip 1: Always Show the Carry Row When performing binary addition in an exam, always write the carry row above the two numbers. Even if you get the final answer slightly wrong, examiners can see your method and award you partial marks. A carry row also helps you avoid mistakes — it is surprisingly easy to forget a carry when working under pressure.
Exam Tip 2: Check Your Answer Using Denary After completing a binary addition, convert all three numbers to denary (both inputs and your result) and verify that the denary addition matches. If 01101011 (107) + 00110101 (53) gives you 10100000, check: does 128 + 32 = 160? Does 107 + 53 = 160? Yes — so your binary addition is correct. This 30-second check can save you from losing easy marks.
Exam Tip 3: Spotting Overflow If a question gives you two 8-bit binary numbers to add and asks “what problems might occur?” — that is your cue to discuss overflow. Quick test: if either number starts with a 1 (meaning it is 128 or above), overflow is possible. If both numbers start with a 1, overflow is guaranteed (since both are at least 128, their sum is at least 256, which exceeds the 8-bit maximum of 255).
Exam Tip 4: Read the Question Carefully Some questions ask for the “result of the addition” (meaning the 8-bit answer that would be stored), while others ask “what is the correct answer?” (meaning the full mathematical answer, even if it needs 9 bits). Make sure you answer what is actually being asked. If overflow occurs, state both: the true answer (e.g. 301) and what would actually be stored in 8 bits (e.g. 45).

Past Paper Questions

Try these exam-style questions, then click to reveal the mark scheme answer.

Calculate the result of adding the two 8-bit binary numbers: 00101101 + 01001011. Show your working. [2] marks

Mark scheme:

  • Correct working showing carry bits (1)
  • Answer: 01111000 (1)
Explain what is meant by an overflow error in binary addition. [2] marks

Mark scheme:

  • An overflow error occurs when the result of a calculation is too large to be stored/represented (1)
  • in the available number of bits / e.g. adding two 8-bit numbers produces a 9-bit result (1)
Add the binary numbers 11011010 and 01101001. State whether an overflow error has occurred. [3] marks

Mark scheme:

  • Correct working (1)
  • Result: 01000011 with a carry out (1)
  • Overflow has occurred because the result requires more than 8 bits / the carry bit is lost (1)

Why Binary Addition Matters

Binary addition is not just an exam topic — it is the most fundamental operation that every computer performs. Every single calculation your computer, phone, or games console carries out is ultimately built on binary addition.

Inside the CPU, the component that performs binary addition is called the Arithmetic Logic Unit (ALU). It contains millions of logic gates wired together to add binary numbers at incredible speed — billions of additions per second. Understanding binary addition gives you insight into how computers actually think at the lowest level.

And overflow errors? They are not ancient history. They still cause real bugs today in games (integer overflow exploits), financial systems (incorrect calculations), and embedded systems (sensor data errors). Understanding overflow means you can write safer, more robust software.

Video Resources

Further Reading