SLIDE 1
CSZone.co.uk
Click to advance · Arrow keys also work
AQA 8525 · Section 3.3 · 3.3.4

Binary
Arithmetic

Binary Addition · Overflow · Binary Shifts

CSZoneAQA GCSE Computer Science 8525
Binary Addition Rules

Adding in Binary

THE RULES
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10 (0, carry 1)
1 + 1 + 1 = 11 (1, carry 1)
WORKED EXAMPLE (47 + 28)
0 0 1 0 1 1 1 1 (47)
+ 0 0 0 1 1 1 0 0 (28)
─────────────────
0 1 0 0 1 0 1 1 (75)
Method:Work right to left. Carry 1s into the next column when the sum exceeds 1.
Overflow Error

When the Result Is Too Large

An overflow error occurs when the result of a binary addition is too large to be stored in the available number of bits. The carry bit is lost, giving an incorrect result.
8-bit example (max = 255 = 11111111):

1 1 0 0 0 0 0 0 (192)
+ 1 0 0 0 0 0 0 0 (128)
────────────────
1 0 1 0 0 0 0 0 0 → 9 bits!
Stored as: 0 1 0 0 0 0 0 0 = 64 ← WRONG!
Binary Shifts

Left Shift and Right Shift

LEFT SHIFT (×2 per position)
00001010 (10)
Shift left 1:
00010100 (20 = 10×2)

Shift left 2:
00101000 (40 = 10×4)
RIGHT SHIFT (÷2 per position)
00101000 (40)
Shift right 1:
00010100 (20 = 40÷2)

Shift right 2:
00001010 (10 = 40÷4)
Key rule:Shift left n positions = multiply by 2ⁿ. Shift right n positions = divide by 2ⁿ. Vacated bits fill with 0.
Exam Practice

Have a go at this question

AQA-style question
(a) Add the binary numbers 01100011 and 00101110. Show your working and give the answer in binary.
(b) The binary value 00001101 is left shifted by 2. What is the new denary value?
4 marks
(a) 01100011 (99)
+ 00101110 (46)
= 10010001 (145) [2]
(b) 00001101 = 13
Shift left 2: 00110100 = 52 (13×4) [2]
Key Takeaways

What to Remember

1+1=10 in binary (0, carry 1); 1+1+1=11 (1, carry 1)
Overflow — result needs more bits than available; carry bit lost
Left shift n = ×2ⁿ; Right shift n = ÷2ⁿ
Vacated bit positions fill with 0