Question bank › IB Computer Science › A1 Computer fundamentals

Logic gates, truth tables, K-maps and logic diagrams

Answer on paper first, then reveal the mark scheme one mark at a time.

1Standard5 marks

The logic circuit shown has inputs A, B and C and output Q.

(a) State the Boolean expression for Q. [2]

(b) Construct a truth table for the circuit, showing an intermediate column for (A AND NOT B) and the output Q for all input combinations. [3]

ABCQ
2Core3 marks

(a) Identify the logic gate whose output is 1 only when both of its inputs are 0. [1]

(b) Copy and complete the truth table below for an XOR gate and an XNOR gate, each with inputs A and B. [2]

ABA XOR BA XNOR B
00
01
10
11
3Core4 marks

A lift control system uses three inputs:

  • D = 1 when the lift door is fully closed
  • I = 1 when a floor button inside the lift is pressed
  • O = 1 when a call button outside the lift is pressed

The motor output M = 1 only when the door is closed and at least one of the buttons is pressed.

(a) Construct a Boolean expression for M. [2]

(b) Copy and complete the output column of the truth table for M. [2]

DIOM
000
001
010
011
100
101
110
111
Stuck on Logic gates, truth tables, K-maps and logic diagrams?

Get it sorted in a free 30-minute session

We work through your weakest questions on this topic on Zoom. I reply the same day.

4Standard4 marks

A logic circuit is defined by the Boolean expression

$$Q = \overline{(A + B)} \oplus \left(B\cdot\overline{C}\right)$$

(a) Construct the logic diagram for this expression, using standard gate symbols. [3]

(b) State the value of Q when A = 0, B = 1 and C = 0. [1]

5Standard5 marks

The logic circuit shown has inputs A, B and C. P is the output of the NAND gate, R is the output of the XOR gate and Q is the output of the circuit.

(a) Copy and complete the truth table for the circuit. [3]

ABCPRQ
000
001
010
011
100
101
110
111

(b) The whole circuit could be replaced by a single gate. Identify this gate and justify your answer using the truth table. [2]

ABCQPR
6Standard3 marks

Using the laws of Boolean algebra, simplify the expression

$$X = \overline{\overline{A}\cdot\overline{B}}\cdot\left(A + \overline{B}\right)$$

Show your working. [3]

7Hard5 marks

The truth table below defines the output Q of a circuit with inputs A, B and C.

ABCQ
0001
0010
0101
0110
1001
1011
1101
1110

(a) Construct a Karnaugh map for Q and show the groups you would use to simplify it. [3]

(b) Hence state the simplified Boolean expression for Q. [2]

8Stretch5 marks

A circuit with inputs A, B, C and D has output

$$Q = \overline{A}\,\overline{B}\,\overline{C}\,\overline{D} + \overline{A}\,\overline{B}\,C\,\overline{D} + A\,\overline{B}\,\overline{C}\,\overline{D} + A\,\overline{B}\,C\,\overline{D} + \overline{A}\,B\,\overline{C}\,D + \overline{A}\,B\,C\,D + A\,B\,\overline{C}\,D + A\,B\,C\,D$$

(a) Use a Karnaugh map to simplify the expression for Q. Show your groups. [4]

(b) An engineer claims the circuit could be built with a single 2-input gate. Determine whether this claim is correct. [1]

9Standard4 marks

A technician builds a circuit that is meant to behave as a single XOR gate with inputs A and B. She tests it and records:

ABOutput
001
010
100
111

(a) Identify the gate that the circuit actually behaves as. [1]

(b) NAND is described as a universal gate. Explain how a NOT gate can be built using only a NAND gate. [2]

(c) Outline one reason why manufacturers often build circuits using only NAND gates. [1]

10Hard6 marks

A bank safe has three key switches, one held by each of three managers A, B and C. Each switch gives 1 when its key is turned. The safe opens (S = 1) when at least two of the three keys are turned.

(a) Construct the truth table for S. [2]

(b) Use a Karnaugh map to derive a simplified Boolean expression for S. [3]

(c) Describe the logic diagram that would implement your expression from (b). [1]

Stuck on this topic?

Book a free 30-minute session on WhatsApp and we'll find exactly which step is costing you the marks. Or build a timed paper on it.

Free 30-minute session