The diagram shows a combination of logic gates with inputs A and B and output X. P and Q are intermediate outputs.
(a) Construct a truth table showing P, Q and X for all combinations of A and B. [2]
(b) Write a Boolean expression for X in terms of A and B. [1]
(c) Name the single logic gate that is equivalent to this combination. [1]
(d) A NOT gate is added to output X. Suggest a use for the resulting circuit. [1]
- (a) P column 1, 1, 1, 0 and Q column 0, 1, 1, 1 (for AB = 00, 01, 10, 11)(1)
- (a) X column 0, 1, 1, 0 (ECF from P and Q)(1)
- (b) $X = \overline{A \cdot B} \cdot (A + B)$ (accept $X = \bar{A}\cdot B + A \cdot \bar{B}$)(1)
- (c) EOR / exclusive-OR (gate) (allow XOR; ECF consistent with their X column)(1)
- (d) the output is 1 only when A and B are equal, so it can be used to compare two bits / detect when two inputs are the same (equality detector / comparator for binary numbers) (allow parity checking)(1)
- Answer: (a) X = 0, 1, 1, 0 for AB = 00, 01, 10, 11 (b) $X = \overline{A\cdot B}\cdot(A+B)$ (c) EOR (d) equality detector
- Examiner tip: Label your truth table rows in binary order (00, 01, 10, 11) and fill in P and Q first — trying to find X in one step is where errors creep in.