Mathematics & Logic · Logic & proof
Truth tables and the logic of and, or, not
Logic builds complicated statements from simple ones joined by and, or and not. Learn to test any of them with a truth table, spot two that say the same thing, and see how Boole turned reasoning into algebra.

What you will learn
- Identify a statement as a sentence that's true or false, and say how not and and set the truth of compounds
- Tell inclusive or from exclusive or, and say which one logic uses by default
- Lay out the rows of a truth table, one for each combination, and say why the count doubles
- Fill in a truth table column by column and read off when a compound statement is true
Lesson 1 of 4 · 4 min
True or false, and the two meanings of or
"The kettle is on" is either true or false. "Put the kettle on" is neither, because it's a request. Logic only works with the first kind, a statement, a sentence that makes a claim that's true or false.
Logicians then join statements into bigger ones. The simplest tool is not. It flips a statement's value, so if "the kettle is on" is true, "the kettle is not on" is false.
The next tool is and. "The kettle is on and the oven is on" is true only when both parts are true. If either part fails, the whole thing fails. Say the oven is off. Then the and-statement is false, however hot the kettle is.
Or is trickier, because English uses it two ways. "Soup or salad" on a menu usually means one, not both. That's called exclusive or.
Logic's default is inclusive or. "You'll get cake or ice cream" is true if you get cake, ice cream or both. It's false only when you get neither. Logicians pick this reading because it's the one that matches "at least one".
Ordinary speech often slides between the two. "Mary is either a singer or a poet" hints at only one, yet "either a singer or a poet or both" sounds fine. When the difference matters, logic says "but not both" out loud.
Try to recallWhen is the logical statement "it will rain or it will snow" false, and how would you change it to rule out both?
With logic's inclusive or, it's false only if it neither rains nor snows. Rain, snow or both all make it true. To rule out both, you add "but not both", which makes it an exclusive or.
A statement is a claim that's true or false. Not flips it, and is true only when every part is, and logic's or is true when at least one part is, both included.
Lessons in this topic
True or false, and the two meanings of or
Learn what counts as a statement in logic, how not and and decide its truth, and why logic reads or differently from a restaurant menu.
Truth tables list every case so you don't miss one
Learn how to lay out every combination of true and false, and read off exactly when a compound statement holds.
When two statements say the same thing
Use truth tables to show that two different-looking statements are equivalent, and meet statements that can never be false.
How George Boole turned reasoning into algebra
See how Boole wrote and as multiplication with only 0 and 1, and why his or had to be rebuilt before it became the algebra used today.
Three quick stories from this topic
Invented twice in 1921
Truth tables were published twice in 1921, by two logicians working separately
Ludwig Wittgenstein set them out in his Tractatus, and Emil Post proposed the same method independently that year. Unpublished manuscripts suggest Charles Sanders Peirce had drawn one decades earlier.
A new meaning
In the same 1921 book Wittgenstein used the word tautology for a statement true in every row of its table.
Why it caught on
A truth table turns checking a statement into a finite routine. List every case, fill in the columns and read the answer.
A billion-row table
A truth table for just 30 simple statements needs more than a billion rows
Each simple statement is either true or false, so every one you add doubles the rows. Thirty doublings give 1,073,741,824 combinations, and a full test has to check each one.
Doubling fast
Two statements need 4 rows and three need 8. By ten you're at 1,024.
Always finite
However large, the table has an end, so checking every row always finishes. It can just take a very long time.
Boole's odd law
George Boole's logic rests on a rule ordinary algebra breaks, that x times x equals x
Boole let x stand for a class, such as cats, and x times y for things in both. Cats that are cats are just cats. Among numbers only 0 and 1 obey that rule, so his algebra used those two values alone.
A shoemaker's son
Boole largely taught himself mathematics in Lincoln and published his algebra of logic in 1847 and 1854.
And as times
With only 0 and 1, multiplying works like and. One times one is 1, and any 0 makes the result 0.
Sources
- 2.1 Statements and Quantifiers, Contemporary Mathematics, OpenStax, Rice University
- 2.2 Compound Statements, Contemporary Mathematics, OpenStax, Rice University
- Exclusive or, Wikipedia
- Propositional Logic, Stanford Encyclopedia of Philosophy
- Truth table, Wikipedia
- Tautology (logic), Wikipedia
- 2.3 Constructing Truth Tables, Contemporary Mathematics, OpenStax, Rice University
- George Boole, Stanford Encyclopedia of Philosophy





