Syllabus & Goals 3 min
Cambridge 10.1 · Complete a truth table from a logic circuit Paper 2 · Algorithms, Programming and Logic
By the end of this lesson you can:
- Read a logic circuit, including junction dots and crossing wires.
- Label the output of each gate and use working columns.
- Complete an eight-row truth table for a three-input circuit without errors.
Textbook: Chapter 10, §10.3 Example 1 and Activity 10.2 (pp. 360–362, 364–365)
Recap / Warm-Up 5 min
You now know all six gates. Today you join them: the output of one gate becomes the input of the next.
Quick starter
Give the output of each gate when A = 1 and B = 0: (a) NAND (b) NOR (c) XOR.
Reveal the answer
(a) NAND → 1 (not both 1). (b) NOR → 0 (one input is 1). (c) XOR → 1 (inputs differ).
Key Concept 14 min
1 · Reading a circuit
Signals flow from the inputs on the left to the output on the right. Each gate only ever sees its own two inputs (or one, for NOT). A wire can split to feed two gates; that split is shown with a dot.
2 · The method: one column per gate
- Count the inputs and write all 2n rows in counting order. Every row must appear exactly once.
- Label the output of every gate except the last: P, Q, R… Each label becomes a working column.
- Fill the columns for gates that only use the original inputs first. Their inputs are already in the table.
- Then fill the gates fed by P, Q… working left to right. A gate can only be worked out once its inputs are known.
- Finish with the output X, one whole column at a time. Doing a column at a time keeps you applying one rule, which avoids slips.
3 · Following one row through
Here is one row, A = 1, B = 0, C = 1, traced through the circuit from Worked Example (b). Red wires carry 1; grey wires carry 0.
Worked Example 12 min
(a) A two-input circuit
- Two inputs, so 4 rows: 00, 01, 10, 11. 22 = 4.
- P = A AND B: 0, 0, 0, 1. Only row 11 has both inputs at 1.
- Q = NOT A: 1, 1, 0, 0. Invert column A.
- X = P OR Q: 1, 1, 0, 1. X is 0 only in row 10, where both P and Q are 0.
| Inputs | Working | Output | ||
|---|---|---|---|---|
| A | B | P = A AND B | Q = NOT A | X = P OR Q |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 |
(b) A three-input circuit
- Three inputs, so 8 rows from 000 to 111. 23 = 8.
- P = A NAND B. Write 1 in every row except where A = 1 and B = 1 (rows 110 and 111). NAND is 0 only when both inputs are 1.
- Q = B OR C. Write 0 only where B = 0 and C = 0 (rows 000 and 100). OR is 0 only when both inputs are 0.
- R = P AND Q. Write 1 only where P and Q are both 1. Use the working columns, not A, B and C.
- X = R XOR C. Write 1 where R and C are different. C comes straight from the input as well as feeding Q.
| Inputs | Working | Output | ||||
|---|---|---|---|---|---|---|
| A | B | C | P | Q | R | X |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 | 0 | 1 |
Try It Yourself 12 min
Goal: Complete the four-row truth table for this circuit. Add a working column for the NOT gate.
Goal: Complete the eight-row truth table for this circuit, with one working column.
Goal: Complete the truth table for this four-gate circuit. Input A is used twice.
Hint
Use three working columns: A OR B, NOT C, then the NAND of those two. Only then XOR with column A.
📝 Exam Practice 10 min
Complete the truth table for this logic circuit.
| Inputs | Working | Output | |||
|---|---|---|---|---|---|
| A | B | C | Working space | X | |
| 0 | 0 | 0 | |||
| 0 | 0 | 1 | |||
| 0 | 1 | 0 | |||
| 0 | 1 | 1 | |||
| 1 | 0 | 0 | |||
| 1 | 0 | 1 | |||
| 1 | 1 | 0 | |||
| 1 | 1 | 1 | |||
Mark scheme
- 8 correct outputs = 4 marks; 6–7 correct = 3; 4–5 correct = 2; 2–3 correct = 1.
- Correct X column (000 → 111): 1, 1, 0, 1, 0, 0, 0, 1.
| Inputs | Working | Output | |||
|---|---|---|---|---|---|
| A | B | C | A NOR B | B AND C | X |
| 0 | 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 | 1 |
Look at the circuit in Worked Example (b). State the value of X when A = 1, B = 1 and C = 0.
Mark scheme
- 0 (1). (P = 0, Q = 1, R = 0, X = 0 XOR 0 = 0.)
Explain why it is helpful to add intermediate (working) columns when completing a truth table for a logic circuit.
Mark scheme
- Each column works out the output of one gate at a time (1)…
- …so later gates can use these values, reducing errors / making the working easy to check (1).
Recap & Key Terms 3 min
To complete a truth table from a circuit, write every input row, label each gate's output, and fill one working column per gate from left to right. A dot joins wires; a crossing without a dot does not.
- Logic circuit
- A combination of logic gates designed to carry out a particular task; its output is 0 or 1.
- Intermediate value
- The output of a gate inside a circuit (e.g. P, Q, R) that feeds another gate.
- Working column
- An extra truth-table column holding an intermediate value for every row.
- Junction dot
- A dot where wires join, so the same signal feeds more than one gate.
Homework 1 min
Task (≤ 15 min): Complete the truth table for this circuit. Show a working column for each of the first two gates.
Model answer
| Inputs | Working | Output | |||
|---|---|---|---|---|---|
| A | B | C | A NAND B | NOT C | X = P NOR Q |
| 0 | 0 | 0 | 1 | 1 | 0 |
| 0 | 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 |