Boolean algebra simplifier

Type a logic expression in textbook notation, such as AB + A'C + BC, and get its simplest sum-of-products (DNF) and product-of-sums (CNF) form. For two to four variables the Karnaugh map is drawn as well.

A' or ¬A or !A is NOT; AB, A·B, A*B, A & B or A and B is AND; A + B, A | B or A or B is OR; xor, nand, nor, -> and <-> work too.
Minterm numbers that may be 0 or 1, such as 10, 11, 12. The first variable in alphabetical order is the highest bit.
Minimal sum of products (SOP, DNF)AB + A'C
Minimal product of sums (POS, CNF)
(A + C)(A' + B)
Variables
A, B, C
Minterms (where the expression is 1)
Σm(1, 3, 6, 7)
Maxterms (where the expression is 0)
ΠM(0, 2, 4, 5)
Terms in SOP / POS
2 / 2

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Type the expression. With single-letter variables you can write it the way textbooks do: A'B + AB', (A + B)(A + C).
  2. Optionally list don’t-care minterms.
  3. Read the minimal sum of products and product of sums, and check the Karnaugh map.

How it works

The tool builds the truth table with the variables in alphabetical order (the first is the highest bit of the minterm number). The Quine–McCluskey method merges minterms that differ in one variable until no more merges are possible; what is left are the prime implicants. A branch-and-bound search then picks the cheapest set of primes that covers every minterm, counting terms first and literals second. For the product of sums the same is done for the zeros of the function, and each term is complemented.

Worked example

AB + A’C + BC is 1 for the minterms 1, 3, 6 and 7. The primes are A’C (1, 3), BC (3, 7) and AB (6, 7). Minterm 1 needs A’C and minterm 6 needs AB; together they also cover 3 and 7, so BC is redundant: the minimal form is AB + A’C (the consensus theorem). The zeros 0, 2, 4, 5 give the product of sums (A + C)(A’ + B).

Tips

  • Use brackets when mixing AND and OR: NOT binds tightest, then AND, then XOR, then OR.
  • An expression that simplifies to 1 is a tautology; one that simplifies to 0 can never be true.
  • To see every row, paste the expression into the truth table generator.

Frequently asked questions

How does the simplifier find the minimal expression?

It evaluates the expression for every combination of inputs, then runs the Quine–McCluskey method to list all prime implicants and picks the smallest set that covers every 1: fewest terms first, then fewest literals. The product of sums is found the same way from the 0s and turned around with De Morgan's law.

What do A' and AB mean?

A' is NOT A (the complement), and writing letters side by side means AND, so AB'C is A AND NOT B AND C. A + B is OR. If your variable names are longer than one letter, choose “Words” and write AND explicitly, for example speed and not brake.

What are don't-care terms?

Input combinations that never happen or whose output does not matter, such as the codes 10–15 in a BCD digit. Listing them lets the simplifier treat each as 0 or 1, whichever gives a shorter result.

Is the minimal form unique?

Not always. Some functions have two or more covers with the same number of terms and literals; the tool shows one of them. Both are equally simple and give the same truth table.

How many variables can I use?

Up to 8. The Karnaugh map is drawn for 2, 3 or 4 variables; with more, use the minterm list or the truth table generator.

More in Math

All tools in this category: Math ·Updated November 4, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.