1. Parse and evaluate
The parser applies the displayed precedence rules and builds a syntax tree. It then evaluates every one of the 2n assignments for the distinct variables.
Use up to 8 variables. Named variables are allowed; a contiguous name such as AB is one variable.
Private by design: your expression is parsed and minimized on this device. It is not uploaded, stored, or placed in the page URL.
Your simplified forms and truth table will appear here.
Press Simplify expression or use Ctrl/⌘ + Enter.
| Operation | Accepted input | Meaning | Precedence |
|---|---|---|---|
| NOT | !A, ~A, ¬A, A', not A | Inverts the operand | 1 (highest) |
| AND | A & B, A * B, A ∧ B, A and B, A(B) | True when both are true | 2 |
| XOR | A ^ B, A ⊕ B, A xor B | True when exactly one is true | 3 |
| OR | A | B, A + B, A ∨ B, A or B | True when at least one is true | 4 |
| Implication | A -> B, A => B, A → B, A implies B | False only for 1 → 0 | 5 |
| Biconditional | A <-> B, A <=> B, A ↔ B, A iff B | True when both match | 6 (lowest) |
Constants 0, 1, false, and true are accepted. Adjacent operands imply AND, so A(B + C) means A ∧ (B ∨ C). However, AB is a single variable name; write A B or A * B for two variables.
The parser applies the displayed precedence rules and builds a syntax tree. It then evaluates every one of the 2n assignments for the distinct variables.
Rows where the function is 1 form the canonical SOP minterms. Rows where it is 0 form the corresponding POS maxterms.
The Quine–McCluskey tabulation method repeatedly combines terms differing in one bit. A dash represents a variable that no longer affects that implicant.
Essential prime implicants are selected first. A bounded branch-and-bound search then minimizes term count and, secondarily, literal count. If the search limit is reached, the page clearly labels its deterministic reduced cover.
What “shortest” means here: automatic selection compares the SOP and POS results by literal count, then term count, then displayed length. This is a two-level logical minimization, not a guarantee of the fewest physical gates for a particular circuit technology.
Limits and assumptions: the page uses classical two-valued Boolean logic and supports up to 8 variables, 500 input characters, and 220 tokens. Exact cover search is bounded to keep difficult expressions responsive on phones. No don’t-care conditions are assumed. Implication and biconditional are evaluated before conversion to SOP/POS.
Truth-table equivalence follows OpenStax’s treatment of equivalent statements; complement transformations follow its section on De Morgan’s laws. The minimization approach is the tabular prime-implicant method.
Editorial review: operator truth functions, minimization rules, constants, and representative equivalence tables checked by the Starlight Tools editorial team. Last reviewed: .
A·B + A·¬B = A·(B + ¬B) = A·1 = A. The two product terms cover both possible values of B, so B disappears.
A + A·B = A. Whenever A·B is true, A is already true, so the second term does not add any true rows.
¬(A + B) = ¬A·¬B and ¬(A·B) = ¬A + ¬B. Negating an OR produces an AND of complements; negating an AND produces an OR of complements.
A ⊕ B = ¬A·B + A·¬B. XOR has two isolated true rows, so its minimal SOP contains two product terms. Its POS is (A + B)·(¬A + ¬B).
It evaluates the complete truth table, groups compatible minterms into prime implicants, and selects a cover for the 1 rows to make SOP and the 0 rows to make POS. This makes both outputs logically equivalent to the input.
Sum of products is an OR of one or more AND terms, such as A·B + ¬A·C. Product of sums is an AND of OR factors, such as (A + B)·(¬A + C).
Yes. A' means NOT A, and (A + B)' negates the parenthesized expression. Prefix forms such as !A, ~A, and ¬A also work.
Yes, when there are separate operands: A(B + C) and A B use implicit AND. A contiguous identifier such as AB remains one variable, which avoids ambiguity with names such as alarm.
SOP groups the true rows, while POS groups the false rows. One side of the truth table can form larger or fewer groups than the other, so their term and literal counts can differ.
No. The result minimizes a two-level SOP or POS cover by term count and then literals when exact cover search completes. A physical circuit can sometimes use fewer gates by factoring terms or using XOR, NAND, NOR, or technology-specific optimizations.
Up to 8 distinct variables, producing at most 256 rows. The limit keeps exact tabulation, on-page rendering, copying, and CSV export practical on mobile devices.
No. Parsing, evaluation, simplification, copying, and CSV creation happen locally in your browser. The expression is not transmitted or stored by this tool.