22 min read
Truth Tables for Circuits
Work through a circuit one gate at a time, adding a column for each gate's output, to build its full truth table.
Joining Gates Together
Real circuits join several gates: the output of one gate becomes the input of another. To find what the whole circuit does, you work through it from left to right, one gate at a time.
The trick is to name every wire that comes out of a gate. In this course we use P, R, S … for the middle wires and X for the final output.
X = 1
| A | B | C | P | R | X |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
Try it: Click the inputs A, B and C (or a row of the table). Purple wires are 1; grey wires are 0.
The Method
- Write the inputs (A, B, C) and list all 2ⁿ rows in binary order.
- Add a column for each gate output, in the order the signals flow (left to right).
- Fill each column using that gate's rule and the columns it takes its inputs from.
- The last column is the circuit output.
Practice
A circuit has 3 inputs and 4 gates. How many columns should its full truth table have?
More lessons in Boolean Algebra and Logic Gates · Next: From Circuit Diagram to Boolean Expression · Previous: NAND, NOR and XOR Gates
