Logic gates and circuits
A logic circuit connects gates into a function. You evaluate it by working out the signals one after another.
Rules
- NAND = negated AND, NOR = negated OR
- XOR: 1 when the inputs differ
- XNOR: 1 when the inputs are equal
- Work out intermediate signals one by one
- NAND alone can build any function
Your turn
Three problems on this topic. Any equivalent formula counts.
- 1 · Logic circuit
- 2
- 3
Find the output Z of the circuit for all inputs.
| Signal | Gate | Inputs |
|---|---|---|
| X | OR | C, A |
| Y | OR | X, B |
| Z | XNOR | X, Y |
Z for each input ABC
Tap a cell to switch between 0 and 1. The digits above are the values of the variables.
Worked example
Find the output Z of the circuit for all inputs.
| Signal | Gate | Inputs |
|---|---|---|
| X | NOR | C, B |
| Y | OR | X, A |
| Z | NOR | X, Y |
Worked solution
- 1000: X = 1, Y = 1, Z = 0
- 2001: X = 0, Y = 0, Z = 1
- 3010: X = 0, Y = 0, Z = 1
- 4011: X = 0, Y = 0, Z = 1
- 5100: X = 1, Y = 1, Z = 0
- 6101: X = 0, Y = 1, Z = 0
- 7110: X = 0, Y = 1, Z = 0
- 8111: X = 0, Y = 1, Z = 0
Typical mistake: NAND and NOR are the negated AND and OR; XNOR is 1 when both inputs are equal.
Common questions
Why is NAND universal?
NOT, AND and OR can all be built from NAND, and with them any Boolean function.
