Truth Table Generator
Type a Boolean expression and get its full truth table, with the minterms, the maxterms and the simplified sum of products underneath. Up to six variables, no account.
How to use the truth table generator
- Type the expression. Letters are variables. Write NOT as
A',!Aor~A; AND asAB,A*BorA&B; OR asA + B; XOR asA ^ B. Brackets group as usual. - Read the table. Every combination of inputs is listed in binary counting order, with the output F beside it. Rows where F is 1 are highlighted.
- Take what you need. The minterm list Σm, the maxterm list ΠM and the minimal sum of products are worked out from the same table. Copy table puts it on the clipboard, ready to paste into a spreadsheet or a lab report.
You can also start from a list of minterms: type Σm(1, 3, 5, 6, 7), m(1,3,5,6,7) or simply 1,3,5,6,7.
What a truth table is
A truth table lists the output of a logic function for every possible combination of its inputs. A function of n variables has 2n rows: 4 rows for two variables, 8 for three, 16 for four. Because it covers every case, a truth table is the definition of the function — two expressions are equivalent exactly when their truth tables match.
Rows are written in binary counting order, so the row number is the value of the inputs read as a binary number. With inputs A, B, C, the row 101 is row 5. That number is what a minterm list refers to: Σm(1, 3, 5) means F is 1 on rows 1, 3 and 5 and 0 everywhere else.
A worked example
Take F = A'B'C + A'BC + AB'C + ABC' + ABC. It has three variables, so the table has eight rows. Each product term picks out one row: A'B'C is 1 only when A = 0, B = 0, C = 1, which is row 1. Working through all five terms gives rows 1, 3, 5, 6 and 7, so F = Σm(1, 3, 5, 6, 7).
The same eight rows can be described far more briefly. F is 1 whenever C is 1 (rows 1, 3, 5, 7) and also when A and B are both 1 (rows 6, 7), so F = AB + C. The generator shows that minimal form under the table.
Questions
How many variables can the truth table generator handle?
Up to six variables, which is 64 rows. For a bigger function, the Logic Gate Simulator works on the same expression with the K-map and the circuit beside it.
What symbols can I type?
NOT is ' after a term, or ! or ~ before it. AND is two terms side by side, or *, · or &. OR is + or |. XOR is ^ or ⊕. Use 0 and 1 for constants and brackets to group.
What order are the rows in?
Binary counting order, with the first variable in alphabetical order as the most significant bit. For A, B, C the rows run 000, 001, 010 … 111.
Can I make a truth table from minterms?
Yes. Type the list as Σm(1, 3, 5), m(1,3,5) or 1,3,5. The generator uses the fewest variables that fit, and you can ask for more.