← All tools

Truth Table Generator

Enter a boolean expression and get its full truth table, plus the canonical sum-of-products (DNF) and product-of-sums (CNF) forms and the list of minterm indices. Supports variables, NOT (!), AND (&), OR (|), XOR (^), NAND, NOR, XNOR, implication (->) and biconditional (<->), with parentheses and the constants 0/1. Rows where the expression is true are highlighted. Everything runs locally in your browser.

Expression
Operators (loosest → tightest): <-> IFF, -> IMPLIES, | OR / !| NOR, ^ XOR / !^ XNOR, & AND / !& NAND, ! NOT. Keywords AND/OR/NOT/XOR/NAND/NOR/XNOR/IFF/IMPLIES work too. Constants 0, 1, TRUE, FALSE. Example: (A XOR B) -> C.

Canonical forms

Sum of products (DNF)
Product of sums (CNF)

Truth table

A truth table lists every assignment of the variables (2ⁿ rows for n variables) and the expression's value (0 or 1) for each. The sum-of-products form ORs together one product term per row where the output is 1 (a minterm: each variable appears, negated if its bit is 0) — it's the unique DNF that matches the table. The product-of-sums form ANDs one sum term per row where the output is 0 (a maxterm). The minterm indices are the decimal row numbers (with variables in alphabetical order, the first variable as the most-significant bit) where the output is 1 — the Σm notation. Pairs with the Bitwise Calc and RPN Calculator. Everything runs locally — nothing leaves your browser.