Mathematics from zero
And, or, not
“I will go for a walk if it is sunny AND warm.” Both must hold. “I will go if it is sunny OR warm.” Either one is enough. Swap one word and the whole rule changes. Those small words are the machinery of logic.
After this lesson you can combine statements with AND and OR, flip a statement with NOT, and work out the truth value of a combined statement from the truth values of its parts.
Logic builds bigger statements from smaller ones using AND, OR, and NOT. You know each statement is true or false. These three words take statements and produce a new statement, whose truth value depends on the parts. Learn how each word behaves and you can evaluate any combination.
AND is true only when both parts are true. “It is sunny AND it is warm” is true
only if sunny is true and warm is true. If even one part is false, the whole AND is
false. Both must hold — true AND true is true; every other case is false.
OR is true when at least one part is true. “It is sunny OR it is warm” is true if sunny is true, or warm is true, or both. The only way an OR is false is when both parts are false. One true part is enough to make the whole OR true.
NOT flips a statement’s truth value. NOT takes one statement and reverses it. NOT of a true statement is false; NOT of a false statement is true. “It is NOT raining” is true exactly when “it is raining” is false. NOT is the switch that turns 1 into 0 and 0 into 1.
Work out the truth value of three combined statements. Use the facts: “5 > 3” is true, “2 > 9” is false.
(5 > 3) AND (2 > 9): the parts are true and false. AND needs both true, and one is
false, so the whole thing is false.
(5 > 3) OR (2 > 9): the parts are true and false. OR needs at least one true, and
the first part is true, so the whole thing is true.
NOT (2 > 9): the part “2 > 9” is false. NOT flips it, so NOT (2 > 9) is true.
Each result came only from the parts’ truth values and the rule for the connecting word.
Why this works
Why is OR true even when only one part holds? Because everyday “or” usually means “at least one” — “bring a hat or sunglasses” is satisfied if you bring either, and still satisfied if you bring both. Logic fixes that meaning precisely: OR fails only when everything fails. It is the generous connective; AND is the strict one.
Common mistake
A common mistake is reading OR as “exactly one, not both” — thinking true OR true is
false. In logic, OR is true whenever at least one part is true, and that includes
the case where both are true. true OR true is true. OR only fails when both parts
are false.
Work out: true AND true. Type 1 for true, 0 for false.
Work out: true AND false. Type 1 for true, 0 for false.
Work out: true OR false. Type 1 for true, 0 for false.
Work out: false OR false. Type 1 for true, 0 for false.
Work out: NOT true. Type 1 for true, 0 for false.
When is a statement joined by OR false?
Logic builds bigger statements with three words. AND is true only when both parts are true. OR is true when at least one part is true, and false only when both are false. NOT flips a statement’s truth value, turning true into false and false into true. To evaluate any combination, take the truth value of each part and apply the rule for the connecting word.