Expressions and circuits
A circuit joins gates: one gate's output becomes another's input. An expression describes the same thing in writing.
- Q = (A AND B) OR NOT C
- Work out the brackets first: A AND B.
- Then NOT C.
- Then OR the two results.
Without brackets, NOT is done first, then AND, then OR (just as × comes before + in maths). Questions usually add brackets to make the order clear.
For a three-input truth table, add a working column for each bracket. It saves mistakes.
Build it yourself
Build a circuit for Q = (A AND B) OR NOT C. The target column shows what Q should be; the board tells you when every row matches.
Then try Q = (A OR B) AND NOT (A AND B). Its truth table is the same as one single gate: which one?
From circuit to expression
Start at the inputs and write what each gate does, working towards Q. Put each gate's result in brackets before it feeds the next gate.
From a truth table, look at the rows where Q = 1. If Q is 1 only when A = 1 and B = 0, then Q = A AND NOT B.
Follow the inputs through
Write the value on each wire as you go.