Cambridge A2 Level Computer Science 9618 · 15.2 Boolean Algebra and Logic Circuits

Q16 · 9618/31/M/J/21 Q7

Worked solution from the Hardware and Virtual Machines Paper 3 Advanced Theory booklet, Part 2 of 2.

Q169618/31/M/J/21original Q7Structured · 8 marks
Question 7 from 9618/31/M/J/21

Worked solution

(a)

Read the circuit. P comes from an XOR gate with inputs A and B. Q comes from an AND gate with inputs A and B. R comes from an AND gate with inputs P and C. Output Y is an XOR gate with inputs P and C. Output Z is an OR gate with inputs R and Q.

Work out P, Q and R first, then Y and Z:

ABCPQRYZ
00000000
00100010
01010010
01110101
10010010
10110101
11001001
11101011

Working columns P, Q and R all correct [1]

Output column Y correct [1]

Output column Z correct [1]

(b)

Write: full adder [1]

It adds three bits (A, B and a carry-in C) and gives a sum and a carry-out.

(c)

Use the rows where the output is 1. Write one product term for each row. NOT is written before a letter.

Y = 1 for ABC = 001, 010, 100 and 111:

Y = NOT A . NOT B . C + NOT A . B . NOT C + A . NOT B . NOT C + A . B . C [1]

Purpose of Y: sum bit [1]

Z = 1 for ABC = 011, 101, 110 and 111:

Z = NOT A . B . C + A . NOT B . C + A . B . NOT C + A . B . C [1]

Purpose of Z: carry out (carry bit) [1]

KEY IDEAFind each gate's output step by step; a sum bit and a carry out from three inputs make a full adder.
TOTAL 8 marks

Official mark scheme

Mark scheme for 9618/31/M/J/21 question 7
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.