Boolean Algebra Simplifier with Truth Table

Enter a Boolean expression to find equivalent sum-of-products (SOP) and product-of-sums (POS) forms. Compare the input and simplified result across every assignment in a complete truth table. Everything runs privately in your browser.

Enter a Boolean expression

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.

Simplified result

The example expression is ready to simplify.

Your simplified forms and truth table will appear here.
Press Simplify expression or use Ctrl/⌘ + Enter.

Advertisement

Boolean expression syntax

OperationAccepted inputMeaningPrecedence
NOT!A, ~A, ¬A, A', not AInverts the operand1 (highest)
ANDA & B, A * B, A ∧ B, A and B, A(B)True when both are true2
XORA ^ B, A ⊕ B, A xor BTrue when exactly one is true3
ORA | B, A + B, A ∨ B, A or BTrue when at least one is true4
ImplicationA -> B, A => B, A → B, A implies BFalse only for 1 → 05
BiconditionalA <-> B, A <=> B, A ↔ B, A iff BTrue when both match6 (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.

How Boolean minimization works

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.

2. Collect minterms

Rows where the function is 1 form the canonical SOP minterms. Rows where it is 0 form the corresponding POS maxterms.

3. Combine implicants

The Quine–McCluskey tabulation method repeatedly combines terms differing in one bit. A dash represents a variable that no longer affects that implicant.

4. Select a cover

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: .

Worked Boolean simplification examples

Eliminate a complemented pair

A·B + A·¬B = A·(B + ¬B) = A·1 = A. The two product terms cover both possible values of B, so B disappears.

Apply absorption

A + A·B = A. Whenever A·B is true, A is already true, so the second term does not add any true rows.

Use De Morgan’s law

¬(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.

Expand XOR

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).

Boolean algebra simplifier FAQ

How does this Boolean simplifier work?

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.

What are SOP and POS?

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).

Can I use an apostrophe for NOT?

Yes. A' means NOT A, and (A + B)' negates the parenthesized expression. Prefix forms such as !A, ~A, and ¬A also work.

Does adjacency mean AND?

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.

Why can SOP and POS have different sizes?

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.

Is the result always the fewest possible gates?

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.

How many variables are supported?

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.

Does the page save my expression?

No. Parsing, evaluation, simplification, copying, and CSV creation happen locally in your browser. The expression is not transmitted or stored by this tool.

Explore more tools