About this tool
Truth Table Generator parses and evaluates compound boolean logic expressions to generate exhaustive truth tables for up to six discrete variables. It supports fundamental logic gates (AND, OR, NOT, XOR, NAND, NOR, XNOR), algebraic prime notation (), material implication (), and equivalence (). The tool automatically classifies expressions into tautologies, contradictions, or contingencies and outputs minterm () and maxterm () canonical index representations.
When to use it
- Verify homework and laboratory proofs for Discrete Mathematics and Digital Logic Design courses
- Determine logical equivalence between complex conditional propositions
- Identify whether a boolean expression is a tautology, contradiction, or contingent formula
- Extract canonical Sum of Products (SOP) minterms and Product of Sums (POS) maxterms for circuit synthesis
- Export logic tables directly into academic Markdown or CSV formats for lab reports
How to use it
To generate a truth table
- Enter your boolean formula in the Boolean expression field or click the helper buttons to insert variables () and logic operators.
- Conjunction (AND): Enter
AND,*,&, or∧. - Disjunction (OR): Enter
OR,+,|, or∨. - Negation (NOT): Enter
NOT,!,~, or postfix primeA'. - Exclusive OR (XOR): Enter
XOR,^, or⊕. - Conditional Implication: Enter
->or→. - Biconditional: Enter
<->or↔.
- Conjunction (AND): Enter
- Select your preferred display under Output format:
- Binary (0 / 1): Ideal for computer architecture and digital circuit design.
- Boolean (T / F): Standard for propositional calculus and formal philosophy proofs.
- Review the summary metrics showing total variables (), total truth rows (), logical classification, and canonical minterms.
- Use Copy Markdown or Copy CSV to transfer the complete formatted table to your clipboard.
Questions
What constitutes a tautology, contradiction, or contingency?
In propositional logic:
- Tautology: A statement that evaluates to True () across every possible row of its truth table regardless of variable assignments (for example: ).
- Contradiction: A statement that evaluates to False () across every row of its truth table (for example: ).
- Contingency: A statement whose truth value depends on the truth values of its constituent variables, resulting in a mixture of True and False outputs.
How do minterms and maxterms correspond to truth table rows?
For an -variable truth table with variables ordered alphabetically:
- A minterm () represents a product term that produces a for exactly row in the table. The Sum of Products (SOP) expression is represented as:
- A maxterm () represents a sum term that produces a for row . The Product of Sums (POS) expression is represented as:
What is the operator precedence for boolean evaluation?
When parentheses are omitted, expressions are evaluated in the following hierarchy:
- Parentheses:
(...) - Negation (NOT):
NOT,!,~,' - Conjunction (AND, NAND):
AND,&,*,NAND - Exclusive Disjunction (XOR, XNOR):
XOR,XNOR - Disjunction (OR, NOR):
OR,|,+,NOR - Conditional (Implication):
->,→