Truth Table to Logic Expression
Build canonical disjunctive normal form from variable names and the indices of rows whose result is 1. Processing takes place locally in your browser.
Start using
Truth Table to Logic Expression
Enter 1 through 6 unique comma-separated ASCII variable identifiers and the minterm indices whose truth-table result is 1. Valid indices run from 0 through 2^variableCount-1.
The first variable is the most significant minterm bit. With variables A,B and minterms 1,2, output is (!A && B) || (A && !B).
Duplicate minterm indices are removed. An empty minterm list returns false, representing a function that is zero on every assignment.
Output is canonical disjunctive normal form: ! means NOT, && means AND and || means OR. Every selected row contributes one full minterm containing every variable.
The page does not minimize the expression, accept don't-care rows, generate CNF/POS, draw gates or import a tabular truth table. Use the K-map tool when a minimized expression is required.
Enter minterm indices as comma-separated safe integers; decimal tokens are not accepted. Commas are structural separators in every UI language; decimal tokens and embedded nonnumeric text are rejected. Existing per-tool input bounds still apply.
Duplicate minterm indices are counted once, in their first occurrence order. AND, OR, NOT, true and false are reserved names, regardless of letter case. Each input field accepts at most 500,000 UTF-16 code units; the generated expression also has a 500,000-unit limit. Keep names short because every selected row repeats every variable. The expression is not minimized. The site's K-map tool supports at most four variables.
Processing takes place locally in your browser.