Cambridge AS Level Computer Science 9618 · 1.1 Data Representation

Q22 · 9618/13/M/J/25 Q7

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

Q229618/13/M/J/25original Q7Structured · 5 marks
Question 7 from 9618/13/M/J/25

Worked solution

(a)(i)

Shift 11001010 left 2 places: the two leftmost bits fall off and two 0s enter on the right.

Write: 0010 1000 [1]

(a)(ii)

Shift 10011110 right 3 places, copying the sign bit (1) into the left each time.

Write: 1111 0011 [1]

(b)

Add column by column from the right, carrying 1s:

11110101 + 10110001 = 1 1010 0110 (the leftmost 1 is the overflow bit).

Write: (1) 1010 0110 [1]

(c)

Any method scores. Adding the two's complement: the two's complement of 00011110 is 11100010 (flip to 11100001, add 1).

StepValue
01100100100
+ 11100010−30
= (1) 01000110overflow bit ignored

Binary subtraction shown (any method) [1]

Answer 0100 0110 [1]

KEY IDEASubtract by adding the two's complement, and ignore the carry out of the top bit.
TOTAL 5 marks

Official mark scheme

Mark scheme for 9618/13/M/J/25 question 7
VIDEO
▶ Whole paper

Video solution of the whole paper · by Ismail Adeleke. 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.