Truth table generator
Build a Boolean truth table and identify a tautology, contradiction or contingency. Your inputs stay on your device.
Set up your task
Starting local processing
Ready. Processing stays in this browser.
2 Your result
Your result updates in this browser. Check your input if the result looks unexpected.
How to use Truth table generator
Build a Boolean truth table and identify a tautology, contradiction or contingency. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.
- Check the example inputs: Boolean expression.
- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.
- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.
Supported inputs and limits
Use up to six variables A–Z. Operators are ! (not), & (and), ^ (xor), | (or), -> (implies) and <-> (if and only if). Parentheses group terms.
How it works
A truth table names every possible assignment of Boolean values and evaluates the expression for each row. Logical equivalence means that two expressions produce the same column for all assignments. A single differing row gives a counterexample and is often the quickest way to diagnose a proof attempt.
The parser applies negation first, then and, xor, or, implication and equivalence. Implication associates to the right. Parentheses make an intended grouping clear when a course uses different conventions. The table has two to the power of the number of variables rows, so each extra variable doubles its size.
Example
Run the pre-filled example. Its first result is “Tautology”.
- Boolean expression
- (A -> B) <-> (!B -> !A)
Tautology A B Result 0 0 1 0 1 1 1 0 1 1 1 1
Questions about Truth table generator
What does XOR do?
It returns true when its operands differ. XOR of A and B can be written (A & !B) | (!A & B).
When is A implies B false?
Only when A is true and B is false. In that row the condition is met but the promised consequence fails.
Run the formula A & !A.
Every row is false, so the classification is Contradiction. Try A | !A next and compare the final column.
Related tools
Last updated