Cambridge AS Level Computer Science 9618 · 1.1 Data Representation

Q19 · 9618/13/O/N/24 Q8

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

Q199618/13/O/N/24original Q8Structured · 6 marks
Question 8 from 9618/13/O/N/24

Worked solution

(a)

Multiply each hex digit by its place value: 1 = 1 × 163, F (15) = 15 × 162, A (10) = 10 × 16, B (11) = 11.

4096 + 3840 + 160 + 11

Write: 8107 [1]

(b)

Method: the leftmost bit has a negative place value, so either flip the bits and add 1, or add up the place values.

Flip every bit of 10011111 to get 01100000.

Add 1 to get 01100001. [1]

Convert 01100001 to denary: 64 + 32 + 1 = 97. [1]

The original number was negative, so write: −97 [1]

Other correct way: −128 + 16 + 8 + 4 + 2 + 1 = −97 using the negative place value for the most significant bit.

(c)

In a logical shift, all the bits move to the right and zeros are put in the empty leftmost places. [1]

In an arithmetic shift, all the bits move to the right and the sign bit is copied into the most significant bit (MSB). [1]

KEY IDEAA logical shift fills with zeros; an arithmetic shift keeps the sign bit so negative numbers stay negative.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/13/O/N/24 question 8
VIDEO
▶ Whole paper

Video solution of the whole paper · by Zafar Ali Khan (ZAK). 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.