Docs

Topic 10 · Boolean logic

Logic circuits and expressions

Combine gates into circuits, write logic expressions, complete truth tables, and turn a problem statement into a circuit.

Lesson 2 of 2Syllabus 10.3–10.5updated October 31, 2026

Combining gates

The output of one gate can be the input to another. A logic circuit is drawn from left (inputs) to right (output) and can be written as a logic expression, using brackets to show which gates come first.

Toggle A, B, and C below and follow the 1s through the circuit.

X = (A AND B) OR NOT CInteractive
ABANDCNOTORX=1
X = (A AND B) OR NOT C
Truth table
ABCX
0001
0010
0101
0110
1001
1010
1101
1111

Completing a truth table

For a circuit with several gates, add a working column for each gate's output. Fill the input columns by counting up in binary from 000 to 111, then work out each column from left to right.

ABCA AND BNOT CX
000011
001000
010011
011000
100011
101000
110111
111101

Exam tip. Working columns earn marks and catch mistakes. In the exam you only need to fill the final column, but you can add your own.

From a problem statement

Exam questions often describe a situation in words. Turn each condition into an input, then join them with the gates that match the words and, or, and not.

Problem: a security light (X) turns on when it is dark (A = 1) and either movement is detected (B = 1) or the test button is pressed (C = 1).

That gives X = A AND (B OR C).

Security lightInteractive
ABCORANDX=0
X = A AND (B OR C)
Truth table
ABCX
0000
0010
0100
0110
1000
1011
1101
1111

One more: a XOR circuit

Problem: a hallway light (X) has a switch at each end (A and B). Flipping either switch changes the light, so it is on when exactly one switch is up, unless the master switch C is off (C = 0).

That gives X = (A XOR B) AND C.

Interactive
ABXORCANDX=0
X = (A XOR B) AND C
Truth table
ABCX
0000
0010
0100
0111
1000
1011
1100
1110

Key terms

Logic circuit
Logic gates connected so that outputs feed into other gates.
Logic expression
A circuit written with gate names, inputs, and brackets, such as X = A AND (B OR C).
Working column
A truth table column for an intermediate gate's output.

Check yourself

For X = (A AND B) OR NOT C, what is X when A = 0, B = 1, C = 1?Show answer

A AND B = 0, NOT C = 0, so X = 0 OR 0 = 0.

Write an expression: a fan (X) turns on if it is hot (A) and the window is not open (B).Show answer

X = A AND NOT B.

In the security light circuit, why does the light stay off in daylight even if movement is detected?Show answer

The final gate is AND with A. In daylight A = 0, so the output is 0 whatever B or C are.