Truth Tables and Equivalence
A truth table lists the output of a boolean function for every possible input combination. For inputs, the table has rows. It provides a complete specification of a function.
Two expressions have logical equivalence if and only if their truth tables match row for row. This gives a foolproof test for equality no matter how different the expressions look.
| Inputs () | Rows () |
|---|---|
| 2 | 4 |
| 3 | 8 |
Each row where output is 1 is a minterm. OR-ing minterms together creates a canonical sum-of-products expression, proving any function can be built from gates.
Boolean Laws and Pitfalls
Truth tables verify the laws of boolean algebra:
| Law | Equations | Description |
|---|---|---|
| Identity | , | Neutral elements |
| Complement | , | Inverse logic |
| De Morgan | Negation flips operator | |
| De Morgan | Negation flips operator |
Common pitfall: Applying De Morgan's law incorrectly by writing (wrong) instead of (right). Negation always flips the operator.