Cambridge AS Level Computer Science 9618 · 1.1 Data Representation

Q4 · 9618/12/O/N/21 Q4

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

Q49618/12/O/N/21original Q4Structured · 8 marks
Question 4 from 9618/12/O/N/21

Worked solution

(a)

11001101 = 128 + 64 + 8 + 4 + 1 = 205 [1]

(b)

The left bit is −128: −128 + 64 + 8 + 4 + 1 = −51 [1]

(c)

Split into groups of 4 bits: 1100 = C, 1101 = D. Answer: CD [1]

(d)

In BCD each group of 4 bits must be 9 or less. Here 1100 (12) and 1101 (13) are greater than 9. [1]

(e)(i)

Add column by column:

00111101
+00101101
=01101010

Working with carries shown [1]

Answer: 01101010 [1]

(e)(ii)

Subtract by adding the two's complement of Register 2.

Register 2 = 00101101. Invert: 11010010. Add 1: 11010011.

Add: 00111101 + 11010011 = 1 00010000. Ignore the extra carry on the left.

Working (two's complement added) [1]

Answer: 00010000 [1]

KEY IDEAThe same bits mean different things as unsigned, two's complement, hexadecimal or BCD.
TOTAL 8 marks

Official mark scheme

Mark scheme for 9618/12/O/N/21 question 4
VIDEO
▶ Starts at Q4 (10:09)

Starts at Q4 (10:09) · by HyperDavester. 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.