From circuits to reasoning
Formulas and reasoning
One row tells us what happens now. The whole table tells us what can happen at all. These are different questions.
Theory
A proposition can be true or false
‘The lamp is on’ is a proposition: true (1) or false (0). ‘Turn the lamp on!’ is a command, with no such truth value. A letter A stands for a whole proposition, not a single word.
The operations match the gates: ¬ is NOT, ∧ AND, ∨ OR, ⊕ XOR. A formula combines propositions. An assignment gives a truth value to each letter.
Parentheses change the structure
Without parentheses, evaluate ¬ first, then ∧, then ⊕, then ∨. Compare these expressions with A = 1, B = 0, C = 0: their outermost operations differ.
Select a subexpression by its operator. Letter buttons change values; table arrows apply a complete row.
Truth table and circuit of this formula
| A | B | C | F | Apply |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | |
| 0 | 0 | 1 | 0 | |
| 0 | 1 | 0 | 0 | |
| 0 | 1 | 1 | 1 | |
| 1 | 0 | 0 | 1 | |
| 1 | 0 | 1 | 1 | |
| 1 | 1 | 0 | 1 | |
| 1 | 1 | 1 | 1 |
Truth table
↗ “Show case” sets this row’s inputs on the circuit. The highlighted row matches the current inputs. This explores a case; it does not submit an answer. ? means an unknown signal.
| Show case | A | B | C | F |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | |
| 0 | 0 | 1 | 0 | |
| 0 | 1 | 0 | 0 | |
| 0 | 1 | 1 | 1 | |
| 1 | 0 | 0 | 1 | |
| 1 | 0 | 1 | 1 | |
| 1 | 1 | 0 | 1 | |
| 1 | 1 | 1 | 1 |
Selecting an operator marks its subtree. The small digit after a subtree is its value under the current assignment. Evaluate inner parts before outer parts.
‘If’ does not mean ‘because’
A → B fails only when A = 1 and B = 0: the condition holds but its promised result does not. When A = 0, it is true whatever B is. This is a rule about truth values, not a claim of causation.
Select a subexpression by its operator. Letter buttons change values; table arrows apply a complete row.
Truth table and circuit of this formula
| A | B | F | Apply |
|---|---|---|---|
| 0 | 0 | 1 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 1 | 1 |
Truth table
↗ “Show case” sets this row’s inputs on the circuit. The highlighted row matches the current inputs. This explores a case; it does not submit an answer. ? means an unknown signal.
| Show case | A | B | F |
|---|---|---|---|
| 0 | 0 | 1 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 1 | 1 |
A ↔ B is true when the two values match: 00 or 11. This is a connective within a formula. It does not say A and B match under every possible assignment.
Equal now, or equal in every case?
Equivalent formulas agree in every row: F ≡ G. Consequence asks a different question: can all premises be true while the conclusion is false? If not, the conclusion follows (⊨). Agreement in one row is not enough.
A → B ≡ ¬A ∨ B
Both give 1, 1, 0, 1 across all four rows. Choose another example to examine consequence.
Always, sometimes or never
A tautology is true under every assignment; a contradiction is false under every assignment. Other formulas are sometimes true and sometimes false. A satisfiable formula has at least one true row, so tautologies are satisfiable too!
A ∨ ¬A: both rows are true: a tautology and a satisfiable formula.
We check all assignments of these letters, not just a few successful examples. With at most four variables, there are at most 16 rows.
Practice
Explore a condition
Start with A → B and find its only false row. Replace it with ¬A ∨ B and compare the whole table. The formulas are equivalent: NOT and OR gates suffice.
Select a subexpression by its operator. Letter buttons change values; table arrows apply a complete row.
Truth table and circuit of this formula
| A | B | F | Apply |
|---|---|---|---|
| 0 | 0 | 1 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 1 | 1 |
Truth table
↗ “Show case” sets this row’s inputs on the circuit. The highlighted row matches the current inputs. This explores a case; it does not submit an answer. ? means an unknown signal.
| Show case | A | B | F |
|---|---|---|---|
| 0 | 0 | 1 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 1 | 1 |
Games
Evaluate the formula
Given a formula and an assignment, choose 0 or 1. Your answer is checked immediately.