Truth Table Generator
Generate truth tables for Boolean expressions, common logic gates, minterms and maxterms. Supports AND, OR, NOT, NAND, NOR, XOR and XNOR.
🧠 Digital Logic Rule: A truth table shows every possible input combination and the output for each row. Use it with the Logic Gate Calculator, Boolean Algebra Calculator, K-Map Solver, Binary Converter and Two's Complement Calculator.
🔢 Inputs → Boolean Expression → Truth Table Output
Boolean Expression
Output Label
Output Format
Input Order
Supported symbols: AND or * or ·, OR or +, NOT or !, XOR or ^, plus NAND, NOR, XNOR. Implicit AND also works: AB + C.
Presets:ANDORNOTNANDNORXORXNORHalf Adder SumHalf Adder CarryFull Adder SumFull Adder Carry2:1 MUX
Gate Type
Number of Inputs
Output Label
Use this mode to quickly get standard truth tables for common logic gates. NOT gate uses one input even if a larger input count is selected.
Popular:2-input ANDNANDNORXORXNOR3-input AND
Variables
Mode
Terms
Don't Care Terms Optional
Enter minterm or maxterm numbers separated by commas. For 3 variables, valid term numbers are 0 to 7. Don't-care rows are shown as X.
Examples:Σm(1,3,5,7)Majority 3-input4-var exampleΠM(0)
📐 Formula Reference
Truth Table Rows
Rows = 2ⁿ, where n = number of input variables
Boolean Operators
AND = · or *, OR = +, NOT = ! or ¬, XOR = ⊕ or ^
Minterm Form
F(A,B,C) = Σm(1,3,5,7)
Maxterm Form
F(A,B,C) = ΠM(0,2,4,6)
📋 Quick Reference
2-Input Gates
AND1 only if both 1
OR1 if any input 1
XOR1 if inputs differ
Inverted Gates
NANDNOT AND
NORNOT OR
XNORNOT XOR
Row Count
2 variables4 rows
3 variables8 rows
4 variables16 rows
📚 Digital Logic Notes
Truth table first, simplification secondGenerate the truth table first to verify the logic. Then use the K-Map Solver or Boolean Algebra Calculator to simplify it.
XOR is useful for addersHalf-adder sum is A XOR B. Full-adder sum is A XOR B XOR Cin.
NAND and NOR are universalAny Boolean logic circuit can be built using only NAND gates or only NOR gates.
Minterms identify output 1 rowsEach minterm number is the binary row index where the output is 1.
What is a Truth Table Generator?
A truth table generator creates a table of all possible input combinations for a Boolean expression and calculates the output for each row. It is useful for digital electronics, logic gates, Boolean algebra, K-map simplification and circuit design.
How to use this Boolean truth table calculator
Type an expression such as A AND B, A+B, NOT A, A XOR B or (A AND B) OR C. The tool automatically detects variables and generates the complete truth table.
Truth table vs Boolean expression
A Boolean expression is the logic formula. A truth table is the row-by-row result of that formula for every possible input state. Both describe the same digital logic, but a table is easier to verify visually.
❓ Frequently Asked Questions
List all possible input combinations, usually in binary counting order, then evaluate the expression for each row. For n input variables, the table has 2ⁿ rows.
A 3-variable truth table has 8 rows because 2³ = 8. A 4-variable truth table has 16 rows because 2⁴ = 16.
For two inputs, XOR gives 1 when the inputs are different: 01 and 10. It gives 0 when inputs are the same: 00 and 11.
XOR outputs 1 when inputs are different. XNOR is the inverse, so it outputs 1 when inputs are the same.
In Boolean algebra, A+B usually means A OR B, not normal arithmetic addition. A·B, AB, or A*B usually means A AND B.
Use NOT A, !A, ~A, or ¬A. For a group, write NOT(A OR B) or !(A+B).
Minterms are the row numbers where the output is 1. For example, if output Y is 1 on rows 1, 3, 5 and 7, the minterm form is Σm(1,3,5,7).
A truth table itself verifies the logic, but simplification usually uses Boolean algebra or a Karnaugh map. Use the K-Map Solver after generating the table.