Cambridge O Level Computer Science 2210 · 1.1 Number systems

Q13 · 2210/11/M/J/23 Q1

Worked solution from the Data representation Paper 1 Computer Systems booklet, Part 1 of 3.

Q132210/11/M/J/23original Q1Structured · 11 marks
Question 1 from 2210/11/M/J/23

Worked solution

(a)

Write: B (base 2) [1]

(b)

Use place values 128, 64, 32, 16, 8, 4, 2, 1.

50 = 32 + 16 + 2 = 00110010 [1]

102 = 64 + 32 + 4 + 2 = 01100110 [1]

221 = 128 + 64 + 16 + 8 + 4 + 1 = 11011101 [1]

(c)

Write 78 in binary, flip the bits, then add 1.

78 = 01001110

Flip: 10110001

Add 1: 10110010

Method shown (binary, flip, add 1) [1]

Register: 10110010 [1]

(d)

Add from the right, carrying 1 when the sum is 2 or more.

Bit position76543210
First number00110011
Second number01100001
Carry in11000110
Answer10010100

Working with the carries shown correctly [1]

First four bits 1001 [1]

Last four bits 0100, so the answer is 10010100 [1]

(e)

The result of the addition is bigger than 255 (the largest value 8 bits can hold) [1]

It needs more than 8 bits, but the register only has 8 bits [1]

KEY IDEAUse two's complement by flipping and adding 1; overflow happens when the answer needs more bits than the register has.
TOTAL 11 marks

Official mark scheme

Mark scheme for 2210/11/M/J/23 question 1
VIDEO
▶ Topic lesson

A lesson on this topic · by Mr Bulmer's Learning Zone. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.