Truth Table Generator
Type any logic expression and get its complete truth table at once. See every step, find out whether it is a tautology or a contradiction, get minterms and maxterms, canonical and simplified SOP and POS forms, and check whether two expressions are equivalent. Nothing is uploaded.
How to use Truth Table Generator on KickSolve
Three quick steps, no account needed.
Why choose KickSolve
Built for students, programmers and engineers who need a correct table quickly.
About Truth Table Generator on KickSolve
What it does and how to get the best results.
What is a truth table?
A truth table lists every possible combination of true and false values for the variables in a logic statement, and shows the result of the statement for each combination. With 2 variables there are 4 rows, with 3 variables there are 8 rows, and with n variables there are 2n rows. Truth tables are used in logic, mathematics, computer science and digital electronics to prove that a statement is always true, to compare two statements, and to design circuits.
How to make a truth table online
Type your expression in the box. The table appears at once. Variables are the letters or names in your expression, for example A, B and C. The tool finds them for you, sorts them alphabetically and builds one row for each combination. Turn on Show step columns to add a column for each part of the expression, such as A ∧ B before the final (A ∧ B) ∨ ¬ C. This is the layout most teachers expect in homework and exams.
Operators and symbols you can type
You can write logic the way your course or book does. Words, ASCII symbols and math symbols all work, and you can mix them.
| Operation | Symbols you can type | Words you can type |
|---|---|---|
| NOT | ¬ ! ~ and a trailing ' as in A' | NOT |
| AND | ∧ & && * · or two letters side by side | AND |
| OR | ∨ | || + | OR |
| XOR | ⊕ ^ ⊻ | XOR |
| NAND | ↑ ⊼ | NAND |
| NOR | ↓ ⊽ | NOR |
| XNOR | ⊙ | XNOR |
| Implies | → -> => ⇒ ⊃ | IMPLIES or IMP |
| If and only if | ↔ <-> <=> ⇔ ≡ == | IFF |
| True and false | 1 and 0 | TRUE and FALSE |
Brackets can be round, square or curly. Write A'B + AB' in the Boolean algebra style, with a prime for NOT, and the tool understands that two letters side by side mean AND.
Order of operations (precedence)
When there are no brackets, the tool follows the usual order, from strongest to weakest:
- NOT binds first.
- AND and NAND come next.
- XOR and XNOR follow.
- OR and NOR come after that.
- Implies is weaker still, and a chain such as A → B → C is read as A → (B → C).
- If and only if is the weakest.
If you are not sure, add brackets. The column headings of the table show the expression with only the brackets that are needed, so you can check how it was read.
The basic logic gates at a glance
This table shows the result of the common two-input operations for each pair of inputs, where 1 is true and 0 is false.
| A | B | AND | OR | NAND | NOR | XOR | XNOR | Implication | Biconditional |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 1 |
Tautology, contradiction and contingency
A statement whose result is true in every row is a tautology, such as A ∨ ¬ A. A statement that is false in every row is a contradiction, such as A ∧ ¬ A. Everything else is a contingency: it is true for some inputs and false for others, which also means it is satisfiable. The analysis panel tells you which one your expression is.
Minterms, maxterms, SOP and POS
Every row where the result is 1 is a minterm. The row number is read from the inputs as a binary number, with the first variable as the most significant bit. The canonical sum of products (SOP) is the OR of one AND term for each minterm. Every row where the result is 0 is a maxterm, and the canonical product of sums (POS) is the AND of one OR clause for each maxterm.
The tool writes both as Σm(1, 3, 5) and ΠM(0, 2, 4), and also as a full expression you can copy.
Simplify a Boolean expression
The simplified SOP and POS use the Quine-McCluskey method. It combines minterms that differ in one variable until only the prime implicants are left, takes the essential ones, and then finds the smallest set that covers all the rest. The answer is a minimal sum of products or product of sums, the same result you would get from a Karnaugh map. It works for up to 8 variables. For example, A'B + AB' cannot be simplified, but A + A'B becomes A + B.
Check if two expressions are equivalent
Two statements are logically equivalent when they have the same result in every row. Type the second expression in the equivalence box and press Check equivalence. The tool compares both over all variables from both expressions. If they differ, it shows how many rows differ and one example. A well-known pair is De Morgan's law: ¬(A ∧ B) is equivalent to ¬ A ∨ ¬ B.
XOR versus OR, and what implication means
OR is true when at least one input is true, and it is also true when both are. XOR (exclusive or) is true when exactly one input is true. The implication A → B is false in only one case: A is true and B is false. If A is false the statement is true whatever B is. This surprises many people at first, and the truth table shows it clearly.
NAND and NOR are universal
NAND and NOR are called universal gates because any other logic function can be built from NAND gates alone, or from NOR gates alone. You can test that here: type (A ↑ A) ↑ (B ↑ B) and compare it with A ∨ B using the equivalence check.
Truth Table Generator examples
Real input and output so you can see exactly what changes.
A AND B
Input
A AND BOutput
A B | result
0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1Implication
Input
A -> BOutput
A B | result
0 0 | 1
0 1 | 1
1 0 | 0
1 1 | 1Three variables
Input
(A AND B) OR NOT COutput
A B C | result
0 0 0 | 1
0 0 1 | 0
0 1 0 | 1
0 1 1 | 0
1 0 0 | 1
1 0 1 | 0
1 1 0 | 1
1 1 1 | 1A tautology
Input
A OR NOT AOutput
A | result
0 | 1
1 | 1When do you need a truth table generator?
Common reasons people use this page.
Privacy, limits and browser support
What happens to your data and what to expect.
- How it works: with KickSolve, the truth table runs in your browser with JavaScript. Your expressions are not sent to a server and are not stored.
- Limits: up to 10 variables, which is 1,024 rows. Simplification to minimal forms works for up to 8 variables.
- Browsers: current Chrome, Edge, Firefox and Safari on desktop and mobile.
Read the KickSolve privacy policy for details about the site itself.
Frequently asked questions
Quick answers.
How do I make a truth table?
Type your logic expression in the box, for example (A AND B) OR NOT C. The table with all rows appears at once. Turn on step columns to see each part of the expression.
How many rows does a truth table have?
It has 2 to the power of n rows, where n is the number of different variables. Two variables give 4 rows, three give 8, four give 16 and so on.
Which symbols can I use?
AND, OR, NOT, XOR, NAND, NOR, XNOR, IMPLIES and IFF as words. Also ∧ ∨ ¬ ⊕ → ↔ ↑ ↓, the programming symbols & | ! ^ and ->, and the algebra style A'B + AB'. You can mix them.
What is the order of operations?
NOT first, then AND, then XOR, then OR, then implies, then if and only if. Use brackets to be sure, and check the column headings to see how the expression was read.
How do I write NOT?
Use NOT, !, ~, ¬, or put a prime after the variable, as in A'.
How do I use variable names longer than one letter?
Choose Words under Variable names in Settings. Then rain AND sun uses two variables called rain and sun instead of the letters r, a, i, n and so on.
What are T and F?
In this tool T and F are normal variable names. Use 1 and 0, or the words TRUE and FALSE, for constants. The Values setting only changes how the table is shown.
What is the difference between OR and XOR?
OR is true if one or both inputs are true. XOR is true only if exactly one input is true, so 1 XOR 1 is 0.
Why is A implies B true when A is false?
The statement only makes a promise when A is true. If A is false, nothing was promised, so the implication is counted as true. It is false only when A is true and B is false.
Can it simplify a Boolean expression?
Yes. It gives a minimal sum of products and product of sums using the Quine-McCluskey method, for up to 8 variables.
How many variables can I use?
Up to 10, which gives 1,024 rows. Larger tables would be very long and slow on a phone.
Can I save or share the table?
Copy the table to paste into a spreadsheet or document, download it as CSV, or copy a link that opens the page with your expression filled in.
Is my expression uploaded anywhere?
No. Everything runs in your browser and nothing is stored.
More free tools from KickSolve
More free text and developer tools.