Lesson 3 of 3
Boolean Logic: Lesson 3

Logic Circuits and Truth Tables

The core exam skill: reading a circuit diagram, tracing each signal through every gate, building the complete truth table and writing the Boolean expression. Systematically, every time.

~40 minutes GCSE Boolean Algebra Practice

In the exam, you will be shown a diagram of gates connected together and asked for a truth table. Students who learn the individual gates but never practice tracing compound circuits almost always get this wrong: not because they don't know the gates, but because they don't have a method.

The method matters: This lesson is about building a reliable process for working through any circuit diagram, step by step, that never fails: even when the circuit is unfamiliar.
How to read a logic circuit diagram

A logic circuit diagram shows inputs on the left, gates in the middle and the final output on the right. Wires carry signals (0 or 1) between gates. The output of one gate feeds into the input of the next.

What to look for:

1. Identify all the inputs (labelled A, B, C, etc.): count them to determine how many rows the truth table needs (2^n rows).

2. Trace the signal from left to right: identify which gates take which inputs.

3. Identify any intermediate signals: the output of one gate becoming the input of another.

4. The final gate's output is the circuit output, labelled Q (or X, Y, or Z in some textbooks).

Key exam skill

In a circuit with 2 inputs there are 4 rows. With 3 inputs there are 8 rows. Always start by writing out all input combinations in order (000, 001, 010, 011, 100, 101, 110, 111 for 3 inputs) before filling in any outputs. Missing rows cost marks even when other rows are correct.

Five steps to complete any truth table from a circuit
1

Count inputs and draw the table. For n inputs, write 2^n rows. List all input combinations in binary counting order (00, 01, 10, 11 for 2 inputs). Add a column for each intermediate signal and the final output.

2

Identify the first gate(s) to evaluate. Start with gates that take only the original inputs (A, B, C): not gates that need intermediate signals. These are the "leftmost" gates in the circuit.

3

Fill in intermediate columns one gate at a time. For each row, apply the gate's rule to the input values and write the result. Label intermediate columns clearly: e.g. "NOT A" or "A AND B": to avoid confusion.

4

Work right across the table, gate by gate. Once you have the intermediate columns, fill in the final output column using the last gate's rule applied to its inputs (which may be intermediate signals).

5

Write the Boolean expression. Read the circuit diagram from right to left and write the expression for Q. For example: if the last gate is an OR taking (NOT A) and (A AND B) as inputs, the expression is Q = (NOT A) OR (A AND B).

Circuit: A AND (NOT B)

This circuit has two inputs (A and B). B passes through a NOT gate first, then the output of NOT B and the original A both enter an AND gate. The final output is Q.

Boolean expression:

Q = A AND (NOT B)

Circuit diagram:

A B NOT AND Q NOT B

Truth table: filled in step by step:

ABNOT BQ = A AND (NOT B)
0010
0100
1011
1100
Row 1 (A=0, B=0): NOT B = 1. Then 0 AND 1 = 0. AND needs both to be 1.
Row 2 (A=0, B=1): NOT B = 0. Then 0 AND 0 = 0. Neither input to AND is useful.
Row 3 (A=1, B=0): NOT B = 1. Then 1 AND 1 = 1. Both inputs to AND are 1: output 1.
Row 4 (A=1, B=1): NOT B = 0. Then 1 AND 0 = 0. B inverted kills the output.

Reading this circuit in English: "Output is 1 only when A is 1 and B is 0." Only one row (A=1, B=0) gives output 1. This is a useful pattern: recognise it.

Three-input circuit: (A OR B) AND (NOT C)

This circuit has three inputs. A and B enter an OR gate. C passes through a NOT gate. Both intermediate outputs then enter an AND gate to produce the final output Q.

Boolean expression:

Q = (A OR B) AND (NOT C)

Circuit diagram:

A B C OR A OR B NOT NOT C AND Q

Truth table (8 rows: all combinations of A, B, C):

ABCA OR BNOT CQ
000010
001000
010111
011100
100111
101100
110111
111100
Pattern recognition

Notice that Q is 1 exactly when C=0 and at least one of A or B is 1. The NOT C column halves the rows where output can be 1. Spotting this pattern helps you check your work: the circuit should output 1 exactly when "night mode" (C) is off and the system is activated (A or B). This is the corridor light problem from Lesson 1: now fully traced.

Writing a Boolean expression from a circuit

When asked to "write the Boolean expression for the output Q", trace from the final gate backwards through the circuit and build up the expression layer by layer.

Rule: The final gate gives you the outermost operator. Its inputs (which may themselves be gate outputs) become the operands, wrapped in brackets.

Example: If the last gate is an OR, and its left input comes from an AND gate (A, B) and its right input is a NOT gate (C), the expression is: Q = (A AND B) OR (NOT C).

No brackets needed when an input is a single variable: only use brackets around compound sub-expressions.

Common mistakes

1. Writing expressions without brackets where they are needed: NOT A AND B is ambiguous (is it "(NOT A) AND B" or "NOT (A AND B)"?). Always bracket sub-expressions. 2. Starting from the left: always read expressions from right to left (final output first). 3. Omitting NOT: the NOT gate is easy to miss when tracing a circuit. Look for the inversion bubble.

Boolean Algebra Practice tool

Enter a Boolean expression and evaluate it for all input combinations. Use this to check your manually constructed truth tables and to explore more complex expressions.

Boolean Algebra Practice
Enter expressions like (A AND B) OR (NOT C) and evaluate them step by step. Opens in a new tab.

Try these: (1) Enter A AND (NOT B) and verify it matches the truth table from Worked Example 1. (2) Enter (A OR B) AND (NOT C) and check all 8 rows match Worked Example 2. (3) Try (A NAND B) OR C: predict the truth table before you run it.

Quick quiz: logic circuits and truth tables

Q1. A logic circuit has 3 inputs. How many rows does the truth table have?

4
6
8
With 3 inputs, each can be 0 or 1, giving 2³ = 8 combinations: 000, 001, 010, 011, 100, 101, 110, 111. The formula is always 2^n where n is the number of inputs.

Q2. A circuit has the expression Q = A AND (NOT B). What is Q when A=1, B=0?

1
0
NOT B: NOT 0 = 1. Then A AND (NOT B) = 1 AND 1 = 1. Both inputs to AND are 1, so output is 1. This is the only row where A AND (NOT B) gives 1.

Q3. Which column should you fill in first when building a truth table from a circuit diagram?

The final output (Q)
Intermediate signals from the first gates
All columns at once
Always fill in intermediate columns first, starting with gates that take only the original inputs. The final output column can only be calculated once you have the intermediate values it depends on. Working left to right through the circuit prevents errors.

Q4. What is the output of Q = (A OR B) AND (NOT C) when A=0, B=0, C=0?

1
0
Step by step: A OR B = 0 OR 0 = 0. NOT C = NOT 0 = 1. Final: 0 AND 1 = 0. The AND gate fails because A OR B is 0: even though NOT C is 1, you need both inputs to AND to be 1.

Q5. A circuit shows an OR gate feeding into a NAND gate along with input C. Which part of the expression do you write first?

C first, then the OR
The OR sub-expression first, then wrap it in the NAND
It doesn't matter, the order is flexible
The OR gate feeds into the NAND gate, so (A OR B) is one input to NAND. The expression is Q = NOT ((A OR B) AND C) or equivalently Q = (A OR B) NAND C. The sub-expression for the earlier gate is always bracketed and placed inside the final gate's expression.
Think deeper

Look at the expression Q = (A AND B) OR (NOT A AND NOT B). Without building the full truth table, can you predict when Q will be 1? What gate does this circuit behave like?

Q is 1 when either (A=1 AND B=1) or (A=0 AND B=0): in other words, when A and B are the SAME value. When A and B are different, Q is 0. This is the exact opposite of XOR. It is XNOR: Exclusive NOR. So this complex expression with four gates is equivalent to a single XNOR gate. This is why simplification of Boolean expressions matters: you can often replace a complicated circuit with a simpler one that behaves identically.

Series complete!

You have covered all three lessons in Boolean Logic. Test yourself with the exam questions below: they are structured exactly like the questions you will see in the actual exam.

Lesson 3: Boolean Logic
Logic Circuits and Truth Tables
Starter activity
Write on the board the expression Q = (A OR B) AND (NOT C). Ask students: how many rows does the truth table have? (8: three inputs.) Give them 5 minutes to attempt the full table from scratch before the lesson starts. Collect responses to identify common errors: most students will forget rows or get the NOT column wrong. These are the exact errors this lesson addresses.
Lesson objectives
1
State the number of truth table rows for a circuit with n inputs using the formula 2^n.
2
Complete a full truth table for a 2-input or 3-input compound circuit by filling in intermediate columns.
3
Write the Boolean expression for a circuit by tracing from output back to inputs.
4
Evaluate a Boolean expression for a given set of input values, showing all working.
Key vocabulary
Logic circuit
A diagram showing logic gates connected by wires to produce a combined Boolean output.
Intermediate signal
The output of a gate that feeds into another gate rather than being the final circuit output.
Boolean expression
A formula using AND, OR, NOT (and NAND, NOR, XOR) to describe a logic circuit's output.
Truth table
A table with 2^n rows for n inputs, showing all possible input combinations and the corresponding output(s).
Discussion questions
If two different circuits produce exactly the same truth table, are they equivalent? Could a manufacturer always use the simpler one?
Why do engineers add intermediate signal columns to a truth table rather than jumping straight to the output? What errors does this prevent?
A student says: "If there are 4 inputs, I need 8 rows." Are they correct? What is the right answer?
Exit tickets
A circuit has 3 inputs. State the number of rows in the truth table and explain why. [2 marks]
Evaluate Q = A AND (NOT B) when A = 1 and B = 1. Show your working. [2 marks]
A circuit has an OR gate feeding into an AND gate alongside input C. Write the Boolean expression for Q where the OR gate takes inputs A and B. [2 marks]
Homework suggestion
Write the Boolean expression and complete the full truth table for: Q = (NOT A) AND (B OR C). Show all intermediate columns. Then describe in plain English what the circuit does: when is the output 1?