Boolean Algebra Simplifier screenshot

Boolean Algebra Simplifier

Minimise a boolean expression to its smallest sum of products with Quine–McCluskey and an exact cover search, verified against every truth-table row.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No sign-up, no upload
Minimality proved, not guessed

Boolean Algebra Simplifier

Minimise a boolean expression to its smallest sum of products with Quine–McCluskey and an exact cover search, verified against every truth-table row.

How this page computes

The expression is parsed and evaluated on every assignment, giving the minterm set. Quine–McCluskey then merges terms that differ in one cared-about variable until only prime implicants remain.

An exhaustive search over the prime implicants finds the cover with the fewest terms and then the fewest literals. The chosen cover is re-evaluated on all rows and compared with the table before it is printed.

The calculation runs entirely in this browser tab; nothing is uploaded.

The page reduces a boolean expression to its minimal sum of products and proves the result is minimal rather than merely small. A and B or A and not B simplifies to A, because the two terms differ only in B and cover both values of it.

The minimisation is Quine–McCluskey over the truth table, followed by an exhaustive search over the prime implicants for the cover with the fewest terms and, among those, the fewest literals. Above four variables the exhaustive cover is dropped, and the page refuses rather than printing a best-effort answer it cannot prove minimal.

How to use Boolean Algebra Simplifier

Type an expression with one-letter variables and press Run. Use and, or, not, xor, implies and iff, or the symbols & | ^ ! -> <->.

The output gives the minimal sum of products in the usual notation — A' for not A, juxtaposition for and, + for or — with the term count, the literal count and the prime implicant list.

Quine–McCluskey, then an exact cover

Each true row of the table is a minterm. Two minterms that differ in exactly one variable combine into a term that drops that variable; repeating this until nothing combines leaves the prime implicants, the terms that no larger term covers.

A minimal sum of products is a smallest set of prime implicants covering every minterm. The page enumerates the subsets with pruning and takes the first that is smallest in terms, then smallest in literals, so the printed form is minimal on both counts.

What to Expect

Best for

  • Reducing a four-variable expression to a minimal sum of products
  • Seeing which prime implicants exist for a function
  • Checking a Karnaugh map answer

Not ideal for

  • More than four variables, where the exact cover is not attempted
  • Product-of-sums minimisation, which is a different normal form
  • Expressions with don't-care rows, which are not stated on this page

What this tool keeps

  • The expression exactly as typed

What may need cleanup

  • Nothing: the form is minimal and checked against the table

Common errors

  • A two-letter name is refused with the spelling it probably meant
  • More than four variables is refused with the ceiling named

Example use cases

  • Simplify A and B or A and not B to A
  • Reduce A xor B to A'B + AB'
  • Check a three-variable Karnaugh map

Sample input

A and B or A and not B

Sample output

minimal sum of products A, one term, one literal

Who this is for

  • Students learning Karnaugh maps
  • Readers simplifying a gate network

Frequently asked questions

What is a prime implicant?

A product term that covers at least one true row and cannot be made larger by dropping another variable without covering a false row. Every minimal sum of products is built from prime implicants, which is why the page lists them.

Is the answer unique?

Not always. Two different covers can tie on both term count and literal count, and the page prints one of them. The prime implicant list shows the alternatives.

What does a constant answer mean?

If the expression is true on every row the minimal form is 1, and if it is false on every row it is 0. Both are printed with the reason, and neither needs a literal.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.