SLIDE 1
CSZone.co.uk
Click to advance · Arrow keys also work
Edexcel 1CP2 · Topic 2 · 2.1d

Binary
Arithmetic

Binary Addition · Overflow · Binary Shifts · Multiplication & Division

CSZoneEdexcel GCSE Computer Science 1CP2
Binary Addition Rules

Adding Binary Numbers

0 + 0 = 0     0 + 1 = 1
1 + 0 = 1     1 + 1 = 10 (write 0, carry 1)
1 + 1 + 1 = 11 (write 1, carry 1)
  01101010  (106)
+ 00110101  (53)
──────────────
  10011111  (159)
Overflow

When the Result Doesn't Fit

Overflow occurs when the result of a calculation is too large to be stored in the number of available bits. In 8-bit, the maximum positive value is 255 (unsigned) or 127 (signed two's complement). Adding two large numbers can cause overflow — the carry out of the MSB is lost.
  11111111 (255)
+ 00000001 (1)
──────────────
1 00000000 ← carry lost! Result appears to be 0 (OVERFLOW)
Binary Shifts

Multiply and Divide by Powers of 2

Left shift: move all bits left by n positions; fill with zeros on right. Equivalent to multiplying by 2ⁿ.
Right shift: move all bits right by n positions; fill with zeros on left. Equivalent to dividing by 2ⁿ (integer division).
00000101 = 5
Left shift 2: 00010100 = 20  (5 × 4)
Right shift 1: 00000010 = 2  (5 ÷ 2, integer)
Exam Practice

Have a go at this question

Edexcel-style question
Add the following 8-bit binary numbers: 01011011 + 00110110. State the result in binary and denary, and identify if overflow has occurred.
3 marks
01011011 (91) + 00110110 (54) = 10010001 [1]
= 128 + 16 + 1 = 145 in denary [1]
No overflow — result fits in 8 bits (MSB = 1, but treating as unsigned 145 < 255) [1]
Key Takeaways

What to Remember

1+1=10 (write 0, carry 1); 1+1+1=11 (write 1, carry 1)
Overflow: result too large for available bits — carry lost from MSB
Left shift n positions = multiply by 2ⁿ
Right shift n positions = divide by 2ⁿ (integer division)