Cambridge O Level Computer Science — past paper questions with full mark schemes
📖 How to use this practice session
These questions are drawn from real Cambridge O Level past papers and are arranged in order of difficulty — Easy, Structured, and Extended. Work through each question as you would in an exam: write your answers in the spaces provided, then reveal the mark scheme to self-mark.
💡 Tick only the marks you genuinely earned. Your running score updates live at the top. When you have marked every question, your grade is calculated automatically and saved.
All data needs to be converted to binary data so that it can be processed by a computer. Explain why a computer can only process binary data.
Mark Scheme — 2 marks
Allow: "logic gates only have two states" as equivalent to transistors
Do not credit: "computers understand binary" or "binary is easier" without explaining WHY (transistors / two states)
Do not credit: reference to 0 and 1 alone without linking to the physical two-state nature of circuits
⭐ Examiner's Note
This is a 2-mark explain question — the most common failure is writing only one idea. You must give TWO distinct points: (1) the physical reason (transistors have two states) AND (2) the mapping to binary digits. Writing "computers use transistors" alone earns [1]. The second mark requires explicitly connecting those two states to 0 and 1.
Question 2
1 mark
Four 8-bit binary values are given. Tick (✓) one box to show which 8-bit binary value is the correct conversion for the denary value 50.
Four 8-bit binary values are given. Tick (✓) one box to show which 8-bit binary value is the correct conversion for the hexadecimal value 90.
A 00001001
B 01011010
C 10010000
D 01100100
Mark Scheme — 1 mark
Hex 90 → nibbles: 9 and 0
9 in binary = 1001 (8+1)
0 in binary = 0000
Joined: 10010000 ✓
Question 4
1 mark
Binary is a number system used by computers. Tick (✓) one box to show which statement about the binary number system is correct.
A It is a base 1 system
B It is a base 2 system
C It is a base 10 system
D It is a base 16 system
Mark Scheme — 1 mark
Question 5
2 marks
HTML colour codes and Media Access Control (MAC) addresses are two examples of where hexadecimal is used in Computer Science. Give two other examples of where hexadecimal can be used in Computer Science.
Mark Scheme — 2 marks (1 per valid example)
Credit any valid example, e.g.:
• Memory addresses (e.g. 0x1A3F2C00)
• Error / fault codes (e.g. Windows BSOD codes such as 0x0000007E)
• Assembly language / machine code / debugging / hex dumps
• IPv6 addresses
• Representing character codes / Unicode / ASCII values
• Pixel colour values in image editing software
• Network packet data
• Checksum / hash values
Do not accept: "web colours" (same as HTML), "network device IDs" (same as MAC), or vague answers such as "computer storage" without specifics
⭐ Examiner's Note
Students commonly re-state examples from the question (HTML colours, MAC addresses) — these earn zero marks. You must give different applications. The most reliable safe answers are memory addresses and error/fault codes — both appear in every Cambridge mark scheme for this question type.
Question 6
1 mark
A logical left shift of two places is performed on the binary value 01010010. State one effect this logical shift has on the binary value.
Mark Scheme — 1 mark
Allow: "multiplied by 2 per shift, so ×4 total" | "equivalent to multiplying by 2 twice"
Also allow: "the bits move two positions to the left and zeros fill from the right" as description of the process (but multiplication is the better answer for "effect")
Do not accept: "the number gets bigger" without quantifying how much
01010010 = 82 in denary
After left shift ×2: 01001000 = 72
Note: a 1-bit was lost from position 6 (value 64 was shifted out)
Strictly: 82×4=328, but overflow occurred → stored value is 72, not 328
Best answer for "effect": multiplied by 4 (×2 per shift place)
⭐ Examiner's Note
The expected answer is the arithmetic effect: a left shift of N places multiplies the value by 2ᴺ. For 2 places: ×4. Note that if a 1-bit is shifted off the left edge, overflow occurs and the stored result is incorrect — but the question asks for the "effect", so multiplication is the target answer. Cambridge will also accept a description of bits moving left with zeros filling the right.
📝 Section B — Structured Questions | 31 marks
Question 7
3 marks
The denary values 64, 101 and 242 are converted to 8-bit binary values. Give the 8-bit binary value for each denary value.
Allow answers without leading zeros ONLY if the question does not specify "8-bit" — but here 8-bit IS specified, so all answers must be 8 bits
⭐ Examiner's Note
The most common error is forgetting to pad to 8 bits. If you write "1000000" for 64 (7 bits), you will lose the mark. Always count your bits. The second common error is on 101: students write 01101001 (= 105) rather than correctly placing the bits. Always verify: add up the place values under your 1-bits.
Question 8
3 marks
Convert these three denary numbers to 8-bit binary numbers.
Award the mark if both nibbles are correct even if not shown separately, provided the final answer is correct
Do not accept: 11001110 for 42 — this is a reversed-nibble error
⭐ Examiner's Note
The key pitfall is not padding nibbles to 4 bits. Hex digit 2 = binary 10, but you must write it as 0010 (4 bits). Writing 42 → "01010" is wrong because "2" became "10" not "0010". Also: E=14, not E=4 — students sometimes forget that E is a letter representing 14.
Question 10
4 marks
Part of a MAC address is: 97–5C–E1 Each pair of hex digits is stored as binary in an 8-bit register. Complete the binary register for these two pairs of digits.
Cambridge awards [1] for the carry row even if the final answer is wrong. Always write the carry row — it can save a mark when arithmetic slips occur. Work strictly right to left. The most common error here is dropping a carry in columns 4–6 where three consecutive 1+0+carry=2 situations chain together.
Question 12
3 marks
Add the two 8-bit binary numbers using binary addition. Give your answer in binary. Show all your working.
Denary values are converted to binary values to be processed by a computer. Draw one line from each denary value to the correctly converted 8-bit binary value.
Denary
41
174
86
8-bit binary
00100001
10100110
00101001
10000110
10101110
01010110
Note: in your exam, draw lines. Here, write the binary match for each denary value below:
Strategy: first eliminate clearly wrong options. 174 > 128, so its MSB must be 1 — only 10100110 and 10101110 qualify. Then verify: 10100110=128+32+4+2=166 ✗; 10101110=128+32+8+4+2=174 ✓. This elimination strategy is faster than converting all 6 options from scratch.
Question 14
2 marks
Give the correct denary value for the 12-bit binary value 000101010111. Show all your working.
A 12-bit number extends the place value row: 2048 · 1024 · 512 · 256 · 128 · 64 · 32 · 16 · 8 · 4 · 2 · 1. Students often try to use the 8-bit row (128–1) and lose the 256 column. Always write out the full place value row for the bit-width given.
Question 15
2 marks
Another value is stored as binary in a register:
0 1 0 1 0 0 1 0
A logical left shift of two places is performed on the binary value. Complete the binary register to show its contents after this logical left shift.
Result after SHL 2:
Mark Scheme — 2 marks
Original: 0 1 0 1 0 0 1 0
SHL 1: 1 0 1 0 0 1 0 0 (bits move left, 0 fills right, MSB 0 lost)
SHL 2: 0 1 0 0 1 0 0 0 (bits move left again, 0 fills right, MSB 1 lost)
Result: 0 1 0 0 1 0 0 0 = 01001000
Note: original MSBs 01 are shifted out and lost.
Two 0s fill the LSB positions.
⭐ Examiner's Note
The two most common errors: (1) filling the empty bits with 1s instead of 0s — logical shifts always fill with zeros; (2) shifting the wrong direction. Left shift = bits move toward the MSB (the left). Work through it as two separate single-bit shifts if you are unsure.
Question 16
6 marks
An HTML colour code is #2F15D6. Each pair of hex digits is stored as binary in an 8-bit register. Give the 8-bit binary value that would be stored for each pair of hexadecimal digits.
Negative denary numbers can also be represented as binary using two's complement. Complete the binary register for the denary value −54. You must show all your working.
The [1] method mark is awarded for showing the inversion step — even if the +1 step has an arithmetic error. Always show both steps explicitly: the inverted row AND the +1 calculation. Writing just the final answer with no working gets 0 marks if the answer is wrong. The MSB of the result must be 1 (it's negative) — if your MSB is 0, something went wrong.
Question 18
2 marks
Binary numbers are stored in registers. Negative denary numbers can be represented as binary using two's complement. Complete the binary register for the denary number −78. You must show all your working.
Two 8-bit binary values are added. The result of this calculation needs to be stored in an 8-bit register. The denary result of this calculation is 301. This generates an error. State the name of this type of error and explain why this error occurs.
Mark Scheme — 3 marks
Allow: "the answer is too big to fit in 8 bits" as equivalent to the second mark point, if the maximum (255) is referenced
Do not accept "overflow error" for the name without saying "overflow" — they must name the specific error type, not describe it
Do not accept vague: "the number is too big" without reference to 8-bit register / 255 maximum
⭐ Examiner's Note
This is a 3-mark question requiring: [1] the name, [1] the size reason (>255), [1] the mechanism (carry out of MSB lost). Students who write only "the number is too big" score [1] maximum. The technical explanation of the carry bit being lost is what separates Grade A from Grade B responses.
Question 20
2 marks
Two binary numbers are added by a computer and an overflow error occurs. Explain why the overflow error occurred.
Mark Scheme — 2 marks
Allow: equivalent answers that reference both the SIZE reason and the MECHANISM (carry out of MSB)
Question 21
6 marks
Ron is attending a music concert. He has bought three tickets. Each ticket number is displayed as a hexadecimal number. Complete the table to show the 12-bit binary values and the denary values for each hexadecimal ticket number.
Hex ticket number
12-bit binary value
Denary value
028
1A9
20C
Mark Scheme — 6 marks (2 per row: 1 binary + 1 denary)
This is a 6-mark hard question requiring 12-bit binary (3 nibbles) and denary. Two key traps: (1) using only 8-bit place values — you need the 256, 512, 1024, 2048 columns too; (2) forgetting that A=10 and C=12. Strategy: convert hex→binary first using nibbles (faster), then sum active place values for denary. Do NOT convert to 8-bit binary — the question specifies 12-bit.
📊 Your Performance
Tick marks above as you go — your score updates automatically.