9618/31/M/J/21 question 7: worked solution (May/June 2021, paper 31)

Show as plain text

Cambridge A2 Level Computer Science 9618 · 15.2 Boolean Algebra and Logic Circuits Worked solution from the Hardware and Virtual Machines Paper 3 Advanced Theory booklet, Part 2 of 2. Q16 9618/31/M/J/21 original Q7 Structured · 8 marks 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: A B C P Q R Y Z 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 1 1 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 IDEA Find 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 VIDEO ▶ Topic lesson A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.