Lesson 1.2 — OR
The Word
OR is the word for choices. In English, it can mean two different things:
- Inclusive OR — at least one is true. Maybe both.
- Exclusive OR — exactly one is true. Not both.
Which one is meant depends on context.
"Cream OR sugar?"
The barista probably means inclusive — you can have both, or one, or neither. They're not making you pick.
"Cake OR pie?"
Your aunt at dinner probably means exclusive — pick one, not both. The choice is the point.
Same English word, different meanings. Logic handles both — it just makes you pick which one you mean. The whole sentence is true or false even if parts of the sentence are true or false. OR is logic that you use everyday!
The Truth Test
Below, you can toggle between the two interpretations and see how the truth changes. Try setting both claims to TRUE and switching modes — that's where the difference lives.
The only row that differs between the two modes is the both-true row. Inclusive OR says TRUE; exclusive OR says FALSE. Set both claims to TRUE and watch the toggle flip the answer — that's the entire difference between the two interpretations.
A Real Example
"We're going to the park OR the beach."
This is usually inclusive — if the day is long, maybe both. Maybe just one. The sentence is true as long as you visit at least one place.
"You can have a dog OR a cat as a pet." (A parent setting a rule.)
Probably exclusive — one pet, not two. The parent is offering a choice, not a collection.
Context decides which OR is meant. The same English word covers both.
Tricky Bits
1. Logic's default is INCLUSIVE. When you see "OR" in a logic textbook or computer code, assume inclusive unless told otherwise. Exclusive OR is usually written XOR.
2. XOR — "OR with a twist."
When English's "or" really means "exactly one — not both," that's exclusive OR, written XOR:
"You can have cake OR ice cream, but not both."
That's XOR. Its truth table is the same as inclusive OR except for the TT row:
| X | Y | X OR Y | X XOR Y |
|---|---|---|---|
| T | T | T | F |
| T | F | T | T |
| F | T | T | T |
| F | F | F | F |
XOR is FALSE when both sides are TRUE; inclusive OR is TRUE there. That's the only difference, but it's a big one. Coin flips, exclusive menu choices, "either/or but not both" — all XOR.
XOR isn't a primitive — you can build it from the basics: (X OR Y) AND NOT (X AND Y). Lesson 2.4 covers when English's "or" really means XOR.
3. OR works on lists.
"Pizza, tacos, or sushi?"
That's a three-way OR — "pizza OR tacos OR sushi." At least one would make the speaker happy (assuming inclusive).
Recap
- OR can be INCLUSIVE (at least one) or EXCLUSIVE (exactly one).
- Context decides which.
- Logic's default OR is INCLUSIVE. Exclusive is written XOR.
- The two modes differ only when both parts are true — inclusive says yes, exclusive says no.
Disclosure: This page was generated by Claude (Anthropic) under Bill's direction. Bill provided the curriculum design and the pedagogical thread; Claude wrote the prose and built the interactive widget.