Skip to content
Engyna

Truth Table Generator

Turn any boolean expression into a truth table, DNF, CNF, a simplified form and a Karnaugh map.

How to use the Truth Table Generator

  1. 1Type a boolean expression such as (A ∧ B) ∨ ¬C, A && !B or A'B + C. Several lines give several output columns.
  2. 2Pick the notation, value style and row order, and turn on intermediate columns to follow each step.
  3. 3Read the minimal DNF and CNF, the canonical forms and the Karnaugh map, then copy the table or download it as CSV.

About Truth Table Generator

The Truth Table Generator evaluates boolean expressions for every combination of inputs. It accepts mathematical notation (∧ ∨ ¬), programming operators (&& || !), engineering notation such as A'B + C, and plain words like AND, OR, NOT and XOR, along with NAND, NOR, implication and equivalence. Several lines produce several output columns in one table, and the tool shows whether all outputs are equivalent, which is handy for checking De Morgan's laws or a simplified circuit.

Intermediate columns show the value of every subexpression so you can follow the evaluation step by step, and row numbers give each row's minterm index. From the table, the tool derives the canonical DNF and CNF (sum of minterms and product of maxterms), a minimal DNF and CNF found with the Quine–McCluskey method, and a Karnaugh map for two to four variables, grouped on the ones or the zeros. Each output is also classified as a tautology, a contradiction or satisfiable.

Students of discrete mathematics, logic and digital electronics can use the truth table generator to check homework, design logic gate circuits and verify boolean algebra simplifications. Copy the table or download it as CSV.

Frequently asked questions

Which operators and notations can I use?

NOT as ¬, !, ~ or a trailing apostrophe; AND as ∧, &, &&, · or * (or just write terms next to each other); OR as ∨, |, || or +; XOR as ⊕ or ^; NAND as ↑; NOR as ↓; implication as → or ->; equivalence as ↔, <-> or ==. The words AND, OR, NOT, XOR, NAND, NOR, IMPLIES and IFF work too.

How is the simplified form found?

With the Quine–McCluskey method: all prime implicants are collected, then an exact search picks the smallest set that covers every true row, with the fewest literals as a tie-breaker. In the rare case that search takes too long, a near-minimal result is shown and marked as such. The minimal CNF comes from doing the same for the false rows.

What is the difference between DNF and CNF?

A disjunctive normal form (sum of products) ORs together AND terms, one for each true row in its canonical version. A conjunctive normal form (product of sums) ANDs together OR clauses, one for each false row. Both describe the same function.

How many variables are supported?

Up to 12 variables for the truth table (4,096 rows), simplification up to 10 variables and Karnaugh maps for 2 to 4 variables, where groups are easy to see.

What is a tautology in logic?

A tautology is an expression that is true for every combination of inputs, such as A ∨ ¬A. A contradiction, such as A ∧ ¬A, is false in every row. Anything that is true in at least one row is called satisfiable.

  • Practice multiplication and division facts with timed rounds and smart repetition of mistakes.

  • Sharpen mental arithmetic with sums, products, squares and percentages at your level.

  • Learn word lists by typing, multiple choice or flashcards, with forgiving answer checks.