📁 Paper 1 · Topic 1: Data Representation
1.1c Binary Arithmetic, Overflow & Binary Shifts
Cambridge IGCSE Computer Science 0478 · ~12 min read · ⭐ Pro

Binary Addition

Binary addition uses the same column-by-column method as denary addition but with only two digits. The rules are:

ABSumCarry
0000
0110
1010
1101

Example: Add 00110101 (53) and 00101001 (41):

Result: 01011110 = 90 ✓

Overflow

Overflow occurs when the result of an arithmetic operation is too large to be stored in the available number of bits. For 8-bit unsigned binary, the maximum value is 255. If a result exceeds this, a carry beyond the 8th bit occurs — this bit is lost, causing an incorrect result.

Example: 11000000 (192) + 10000000 (128) = 100000000 = 256, but stored in 8 bits as 00000000 — overflow error.

Exam tip: State that overflow occurs when the result of an addition or shift operation cannot be stored in the available number of bits, and the carry bit is lost. Cambridge may ask you to identify when overflow has occurred from a worked example.

Logical Binary Shifts

A logical shift moves all bits left or right by a specified number of positions. Vacated positions are filled with 0s. Bits shifted out are lost.

  • Logical left shift by 1: equivalent to multiplying by 2
  • Logical right shift by 1: equivalent to integer division by 2
OriginalOperationResultDenary
00001010 (10)Left shift by 20010100040 (×4)
00010100 (20)Right shift by 2000001015 (÷4)

Arithmetic Binary Shifts

An arithmetic shift preserves the sign bit (MSB). Used for signed (two's complement) numbers.

  • Arithmetic right shift: the MSB is copied into vacated positions (preserves the sign)
  • Arithmetic left shift: same as logical left shift; zeros fill from the right

Example: Arithmetic right shift of 11001000 (–56) by 1: → 11100100 (–28). The sign bit (1) is preserved; value halved.

⚠️ Common Mistakes
  • Confusing logical and arithmetic shifts (arithmetic shifts preserve the sign bit)
  • Thinking a left shift always multiplies — if a 1-bit is shifted out, overflow occurs and the result is incorrect
  • Forgetting that vacated bits are filled with 0 in logical shifts
Video coming soon

Key points

  • Binary addition rules and worked examples
  • Overflow — when and why it occurs
  • Logical left and right shifts: multiplying and dividing by powers of 2
  • Arithmetic shifts and sign bit preservation
Click slide or press arrow keys to navigate
✍️

Worksheet — Binary Arithmetic & Shifts

5 questions · 10 marks

Q1Add the binary numbers 01001101 and 00110110. Show your working and state the result in denary.[3]
✅ Mark scheme
01001101 (77) + 00110110 (54) = 10000011 [2]; denary = 131 [1]
Q2Explain what overflow means in the context of binary arithmetic.[2]
✅ Mark scheme
Overflow occurs when the result of an arithmetic operation is too large to be stored in the available number of bits [1]; a carry is generated beyond the MSB which is lost, giving an incorrect result [1]
Q3Apply a logical right shift of 2 to 01101100. State the result and its denary value.[2]
✅ Mark scheme
00011011 [1]; denary = 27 [1] (original was 108, ÷4=27)
Q4What is the effect of a logical left shift by 1 on the value of a binary number?[1]
✅ Mark scheme
It multiplies the value by 2 [1] (provided no overflow occurs)
Q5State the difference between a logical shift and an arithmetic shift.[2]
✅ Mark scheme
In a logical shift, vacated bits are always filled with 0 [1]; in an arithmetic right shift, the sign bit (MSB) is copied into vacated positions to preserve the sign of the number [1]
Quiz
Q 1 of 8
Score
out of 8
Click to reveal
TermDefinition
🎯

Mini Test — Binary Arithmetic & Shifts

Timed exam conditions · 10 minutes

  • 5 MCQ + 3 short answer · 10 marks
← 1.1b Negative Numbers Topic 1: Data Representation Next: 1.2a Text (ASCII/Unicode) →
🔒
Pro Content
Subscribe to access all lessons.
£7.99/month
or £59/year
Subscribe now →