Cambridge AS Level Computer Science 9618 · 4.3 Bit manipulation

Q38 · 9618/11/O/N/25 Q4

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

Q389618/11/O/N/25original Q4Structured · 4 marks
Question 4 from 9618/11/O/N/25

Worked solution

(a)

Compare the two patterns: 00011110 has moved two places left to give 01111000.

LSL #2

LSL #2 [1]

(b)

&12 is 00010010. XOR gives 1 where the bits are different.

11100011 XOR 00010010 = 11110001 [1]

(c)

#63 is 00111111. AND keeps a 1 only where both bits are 1.

11100011 AND 00111111 = 00100011 [1]

(d)

Address 100 holds 00110011. OR gives 1 where either bit is 1.

11100011 OR 00110011 = 11110011 [1]

KEY IDEAAND keeps matching 1s, OR gives 1 if either is 1, XOR gives 1 if the bits differ.
TOTAL 4 marks

Official mark scheme

Mark scheme for 9618/11/O/N/25 question 4
VIDEO
▶ Whole paper

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