- Home
- Lessons
- KS3 Computing
- Binary addition and overflow
Binary addition and overflow
🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.
Computers add numbers in binary, column by column, just like you add in denary. There are only four rules to learn.
The four rules
Adding column by column
Start from the right. Write the answer bit underneath and carry to the next column on the left.
00100110 (38)
+ 00010111 (23)
= 00111101 (61)
Check by converting to denary: 38 + 23 = 61.
00100110 (38)
+ 00010111 (23)
= 00111101 (61)
Check by converting to denary: 38 + 23 = 61.
Overflow
8 bits can only hold up to 255.
If a sum is bigger than 255, there is a carry out of the last column with nowhere to go. This is an overflow error.
11111111 + 00000001 = 1 00000000: the answer needs 9 bits, so it does not fit.
If a sum is bigger than 255, there is a carry out of the last column with nowhere to go. This is an overflow error.
11111111 + 00000001 = 1 00000000: the answer needs 9 bits, so it does not fit.
Add 00001011 and 00000110.
- Right column: 1 + 0 = 1.
- Next: 1 + 1 = 0 carry 1.
- Next: 0 + 1 + carry 1 = 0 carry 1.
- Next: 1 + 0 + carry 1 = 0 carry 1.
- Next: 0 + 0 + carry 1 = 1.
- Check: 11 + 6 = 17.
Answer: 00010001
Binary addition: 0+0=0, 0+1=1, 1+1=0 carry 1, 1+1+1=1 carry 1. Work right to left. If the result needs more than 8 bits, an overflow error happens.
The interactive lesson includes the diagrams for this topic.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.