Binary addition
AQA GCSE Computer Science (8525), specification 3.3.4 Binary arithmetic
Binary addition works like column addition in denary: go from right to left and carry into the next column. The difference is that a column carries as soon as it reaches 2, because 2 in binary is 10.
What you need to know
- Add together up to three binary numbers, each up to 8 bits long.
- The rules: 0 + 0 = 0. 0 + 1 = 1. 1 + 1 =
10(write 0, carry 1). 1 + 1 + 1 =11(write 1, carry 1). - AQA's questions have at most three 1s in any column, so the biggest column total is 1 + 1 + 1 =
11. - If the total is more than 255, the answer needs a 9th bit. This is overflow: an 8-bit register has nowhere to store that extra bit, so it would be lost. When a question asks for the full answer, write all 9 bits.
What you don’t need
- Binary subtraction and multiplication — the specification's binary arithmetic is addition and shifts.
Worked examples
Add the 8-bit binary numbers
0011 0101and0001 1110.- Write one number under the other and work from the right.
- 1st and 2nd columns: 1 + 0 = 1, then 0 + 1 = 1.
- 3rd column: 1 + 1 =
10. Write 0, carry 1. - 4th column: 0 + 1 + the carried 1 =
10. Write 0, carry 1. - 5th column: 1 + 1 + the carried 1 =
11. Write 1, carry 1. - 6th column: 1 + 0 + the carried 1 =
10. Write 0, carry 1. - 7th column: 0 + 0 + the carried 1 = 1. 8th column: 0 + 0 = 0.
- Check in denary: 53 + 30 = 83.
Answer:
0101 0011, which is 64 + 16 + 2 + 1 = 83Add the three binary numbers
0000 0111,0000 0011and0000 0001.- 1st column: 1 + 1 + 1 =
11. Write 1, carry 1. - 2nd column: 1 + 1 + the carried 1 =
11. Write 1, carry 1. - 3rd column: 1 + the carried 1 =
10. Write 0, carry 1. - 4th column: the carried 1 = 1. The rest are 0.
- Check in denary: 7 + 3 + 1 = 11.
Answer:
0000 1011, which is 8 + 2 + 1 = 11- 1st column: 1 + 1 + 1 =
Add the 8-bit binary numbers
1100 1000and0110 0100. Give the full answer.- Work from the right as usual. The first six columns have no carries: 0, 0, 1, 1, 0, 1.
- 7th column: 1 + 1 =
10. Write 0, carry 1. - 8th column: 1 + 0 + the carried 1 =
10. Write 0, carry 1. - There's no 9th column to add, so the carried 1 becomes a 9th bit on the left.
- Check in denary: 200 + 100 = 300, which is more than 255 — too big for 8 bits.
Answer:
1 0010 1100, which is 256 + 32 + 8 + 4 = 300. This is an overflow: kept to 8 bits, the 9th bit is lost and you're left with0010 1100, which is only 44.
Common mistakes
- Writing 2 in a column. 1 + 1 is
10in binary: write 0 and carry 1. - Forgetting to add the carried 1 into the next column.
- Writing 3 for 1 + 1 + 1. In binary that's
11: write 1 and carry 1. - Dropping the last carry. If the 8th column carries, write the extra 1 as a 9th bit — and if the question asks, say that it's an overflow.
Practise it
Learn it
A video lesson on this topic is on the way.
Not a subscriber? Watch a sample lesson or see pricing.
Revise next
Written to the published AQA specification. UpperGrades isn’t affiliated with or endorsed by AQA.
