24 min read
From Circuit Diagram to Boolean Expression
Label each gate output, write its expression from its inputs, and substitute until only the circuit inputs are left.
The Step-by-Step Method
To write the Boolean expression for a circuit:
- Label the output of every gate (P, R, S … and X for the final output).
- For each gate, write its expression using its own inputs. Start with the gates nearest the inputs.
- Substitute each label into the next gate's expression.
- Keep going until the final output is written only in terms of the inputs (A, B, C …).
Use brackets whenever an OR expression goes into an AND gate — just like in normal maths, where is different from .
X = 0
| A | B | C | P | R | S | X |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 | 0 | 0 |
Try it: Write the expression for P, R, S and X on paper first. Then press the button to check.
| Truth table for Circuit 2 | ||||||
|---|---|---|---|---|---|---|
A Circuit with XOR and NAND
X = 1
Try it: Find the input combinations that make X = 0.
Practice
An OR gate takes A and B. Its output P and input C go into an AND gate. What is X?
More lessons in Boolean Algebra and Logic Gates · Next: From Expression to Circuit Diagram · Previous: Truth Tables for Circuits
