Cambridge AS Level Computer Science 9618 · 1.1 Data Representation

Q26 · 9618/13/O/N/25 Q2

Worked solution from the Information representation Paper 1 Theory Fundamentals booklet, Part 1 of 3.

Q269618/13/O/N/25original Q2Structured · 6 marks
Question 2 from 9618/13/O/N/25

Worked solution

(a)

Work out the bits needed for each:

Example of dataNumber of bits
hexadecimal F13916
16 000 000 unique amplitude values24
an IPv4 address32
256 unique colours8
an IPv6 address128
denary value 65 00016

Tick each row in its column (F139 is 4 hex digits = 16 bits, 224 is about 16.7 million, 28 = 256, 65 000 is under 216).

All 6 rows correct earns 3 marks (4 or 5 correct earns 2, 2 or 3 correct earns 1) [3]

(b)

108 = 64 + 32 + 8 + 4 = 0000 0110 1100 in 12 bits.

Flip the bits: 1111 1001 0011. Add 1.

Write: 1111 1001 0100 [1]

(c)

Shift 10010011 right 3 places and copy the sign bit (1) into the left.

Write: 1111 0010 [1]

(d)

1110 = E, 0011 = 3, 0011 = 3, 1011 = B.

Write: E33B [1]

KEY IDEACount the bits each item needs, and use groups of 4 bits for hexadecimal.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/13/O/N/25 question 2
VIDEO
▶ Topic lesson

A lesson on this topic · by Craig'n'Dave. 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.