To evaluate an expression, you substitute 0s and 1s for its variables and work out the result, following operator precedence:
- Brackets and long bars first, from the inside out.
- NOT: flip every barred letter.
- AND: work out each product. A product is 1 only if every factor is 1.
- OR: the sum is 1 if any term is 1.
Two shortcuts save time:
- An OR is 1 as soon as you find one term equal to 1, so you can stop early.
- A product is 0 as soon as you find one factor equal to 0.
Evaluating is how you fill in a truth table row by row, how you check a simplification, and how you find a counterexample. It is also exactly what the circuit does: each gate computes its part as soon as its inputs settle.