Truth Table Generator
Generate the truth table of a logic expression with AND, OR, NOT, XOR, NAND, NOR, → and ↔: tautology check, minterms, maxterms and canonical SOP/POS.
Row numbers count in binary with p as the most significant bit, so row 0 is all false; minterm and maxterm numbers use the same order.
| p | q | p → q | ¬q | (p → q) ∧ ¬q |
|---|---|---|---|---|
| F | F | T | T | T |
| F | T | T | F | F |
| T | F | F | T | F |
| T | T | T | F | F |
A truth table lists every combination of true and false values for the variables in a logical expression and shows the result for each. This generator reads expressions written with words or symbols, shows the value of every sub-expression column by column, and tells you whether the expression is a tautology, a contradiction or a contingency. It also lists the minterms and maxterms and writes the canonical sum-of-products and product-of-sums forms used in digital logic.
How to use this tool
- Type the expression, for example (p → q) ∧ ¬q or (A and B) or not C.
- Choose T/F or 1/0 and whether to show sub-expression columns.
- Read the classification and the full truth table.
- Copy the minterms, maxterms, SOP or POS form for circuit design or proofs.
Formula
Rows = 2ⁿ for n variables · A → B ≡ ¬A ∨ B · A ↔ B ≡ (A → B) ∧ (B → A) · A ↑ B ≡ ¬(A ∧ B) · A ↓ B ≡ ¬(A ∨ B)
Precedence from strongest to weakest: NOT, AND (and NAND), XOR, OR (and NOR), implication, biconditional; implication groups to the right. Use brackets when in doubt. Minterm k is the row whose variable values spell k in binary; the canonical SOP ORs together one AND term per true row.
Example
For (p → q) ∧ ¬q the four rows give F, F, F, T only when p and q are both false (row 0), so it is a contingency with minterm Σm(0) and SOP (¬p ∧ ¬q). This is why modus tollens works: whenever p → q and ¬q hold, ¬p holds too. p ∨ ¬p is true in every row, a tautology.
Frequently asked questions
How is A → B evaluated?
It is false only when A is true and B is false. When A is false the implication is "vacuously" true, which surprises many people at first.
Why are my variables in alphabetical order?
Columns are sorted alphabetically so that row numbers, minterms and maxterms follow the usual convention, with the first variable as the most significant bit.
Does it simplify the expression?
It gives the canonical (unsimplified) SOP and POS forms. For a minimal form, group the minterms on a Karnaugh map or use the Quine–McCluskey method.
Last updated:
Page address with these inputs: https://kakao.mobile/tools/truth-table/
Cite or embed this tool
kakaoCalc. (2026, November 9). Truth Table Generator. https://kakao.mobile/tools/truth-table/
“Truth Table Generator.” kakaoCalc, 9 Nov. 2026, kakao.mobile/tools/truth-table/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms