Build a Canonical Standard Form
Use !, &, |, ->, and <->. You may also use NOT, AND, OR, implication words, Unicode symbols, and parentheses.
Example Data Table
The expressions below show how matching truth behavior appears in both canonical forms.
| Expression | True rows | Canonical DNF | Canonical CNF |
|---|---|---|---|
| A ∧ B | 11 | A ∧ B | (A ∨ B) ∧ (A ∨ ¬B) ∧ (¬A ∨ B) |
| A ∨ B | 01, 10, 11 | (¬A ∧ B) ∨ (A ∧ ¬B) ∨ (A ∧ B) | A ∨ B |
| A → B | 00, 01, 11 | (¬A ∧ ¬B) ∨ (¬A ∧ B) ∨ (A ∧ B) | ¬A ∨ B |
Formula Used
The calculator evaluates every assignment, then builds a canonical expression from the matching rows.
- For a minterm, a true variable stays positive.
- For a minterm, a false variable becomes negated.
- For a maxterm, a false variable stays positive.
- For a maxterm, a true variable becomes negated.
How to Use This Calculator
- Enter a Boolean expression in the large text field.
- Use parentheses to make your intended order clear.
- Choose canonical DNF, canonical CNF, or both outputs.
- Select symbols or words for the generated notation.
- Optionally list a preferred variable order with commas.
- Choose all rows or only rows related to one selected form.
- Select Convert Expression to see the result above the form.
- Review the truth table, then download CSV or PDF.
Understanding Logic Expressions and Standard Forms
Logic Building Blocks
Logic expressions describe conditions that can be true or false. They appear in software, digital circuits, searches, rules, and decision systems. A statement may contain variables such as A, B, and C. Each variable represents one truth value. Operators join those values into a larger statement. NOT reverses a value. AND needs both values to be true. OR needs at least one true value. Implication describes a conditional relationship. Equivalence checks whether two statements match. Parentheses control the order of evaluation. A clear standard form makes these relationships easier to inspect. It also gives every variable a consistent place inside the result.
Why Truth Tables Matter
A truth table is the safest way to create a standard form. List every possible variable assignment. Then evaluate the expression for each row. Two variables create four rows. Three variables create eight rows. Four variables create sixteen rows. The number doubles whenever another variable is added. Each final truth value identifies a useful row. True rows build the canonical disjunctive normal form. False rows build the canonical conjunctive normal form. The process avoids guesses about precedence. It also reveals hidden equivalences between different expressions.
Minterms and Maxterms
Canonical DNF is often called a sum of minterms. Each minterm represents one assignment where the expression is true. A variable remains positive when its row value is true. It becomes negated when its row value is false. Join the literals with AND. Then join every minterm with OR. The finished expression is true on exactly the selected rows. Canonical CNF follows the opposite direction. It is a product of maxterms. Each maxterm represents one assignment where the expression is false. Use OR inside a maxterm. Join maxterms with AND. The finished result is false on exactly those selected rows.
Choosing a Form
Choose DNF when you want to show successful cases. It is useful for rules, permissions, and output conditions. Choose CNF when you want to show restrictions. It is useful for constraints, validation, and satisfiability checks. Both forms are logically equivalent to the original expression. They simply present the same behavior in different structures. The forms can become long when many variables appear. That length is normal. A canonical expression records every relevant assignment. Simplified forms may be shorter, but they need additional algebra or minimization methods.
Practical Checks
Enter an expression with supported operators and parentheses. Use symbols or familiar operator words. Review the detected variables before calculating. Set a preferred variable order when a particular table order matters. Generate DNF, CNF, or both forms. Compare the minterm and maxterm indexes with the truth table. Export the table when you need a record. Test a few rows manually for important work. Small checks catch typing mistakes early. Standard forms provide a reliable bridge between a logic rule and its complete truth behavior.
Use the same notation in documentation, testing, teaching, and daily reviews. Consistent results make later reviews faster and reduce confusion among implementation teams.
Frequently Asked Questions
What is a standard form in logic?
A standard form expresses the same truth behavior using a consistent pattern. Canonical DNF uses rows where the expression is true. Canonical CNF uses rows where the expression is false.
Which input operators are supported?
Use NOT, AND, OR, implication, equivalence, parentheses, and constants. The calculator accepts common words, ASCII operators, and several logic symbols after normalization.
What is canonical DNF?
Canonical DNF is an OR expression made from minterms. Each minterm matches one full truth-table row where the original expression evaluates to true.
What is canonical CNF?
Canonical CNF is an AND expression made from maxterms. Each maxterm matches one full truth-table row where the original expression evaluates to false.
Can variable names contain digits or underscores?
Yes. A variable must begin with a letter. After that, it may include letters, digits, and underscores. Names are converted to uppercase for consistent matching.
Why do truth tables grow quickly?
Every added variable doubles the number of assignments. Seven variables already create 128 rows. The calculator limits variables to keep results readable and practical.
Does changing variable order change the meaning?
No. It changes only how rows and literals are listed. The generated form remains logically equivalent when every variable and its truth value are preserved.
What happens when no rows are true?
The canonical DNF is 0. This indicates a contradiction. The expression never becomes true for any available variable assignment.
Is the generated expression simplified?
No. The output is canonical, so it keeps a term for each relevant row. Simplification needs separate Boolean algebra or minimization methods.
Can I export the result?
Yes. CSV exports the complete truth table. PDF creates a printable report containing the expression, canonical forms, and each evaluated assignment.
How should I verify a result?
Use saved tables carefully when checking future equivalent expressions.