A club bouncer lets you in only if you're on the list AND over 18 — both must be true. Logic and truth tables map out exactly when combinations of true/false conditions come out true, the bedrock of every circuit and computer decision.
Statements that are true or false
A proposition is a statement that is either true or false — never both. We combine propositions with connectives: conjunction (p ∧ q, 'and'), disjunction (p ∨ q, 'or'), and negation (¬p, 'not'). A truth table lists every combination of inputs and the resulting output.
p ∧ q is true ONLY when both p and q are true. p ∨ q is true when AT LEAST ONE is true.
p → q ('if p then q') is false only when p is true and q is false. A false premise makes the whole implication vacuously true.
Tap the inputs and switch gates — every computer is built from these.
Toggle the two inputs and switch between AND, OR, XOR, and NAND — the same truth tables that build every circuit.
- Set the gate to AND and try all four input pairs.
- Note for which pair the output is 1.
- Repeat for OR and compare.
What you should see: AND outputs 1 only for (1,1); OR outputs 1 for every pair except (0,0). These are the ∧ and ∨ truth tables.