Using the calculator
Type an expression such as AB + A'C + BC. The first line is the simplest sum of products that gives the same truth table, here AB + A'C. Below it is the truth table, and the rows above the table give the minterms, the maxterms and the shortest product of sums, each with its own copy button. For two to four variables the Karnaugh map is drawn with the chosen groups ringed.
Write the answer as switches the output between AB + A'C, words with AND, OR and NOT, and the && and || of code, so you can paste it straight into an if statement.
Writing an expression
Type it the way your course writes it. AND can be ·, *, &, &&, ∧ or the word AND, or nothing at all, so AB and A(B + C) are ANDs. OR is +, |, ||, ∨ or OR. NOT is a ' after a term, as in A' or (A + B)', or !, ~, ¬ or NOT before it. XOR is ^, ⊕ or XOR, and NAND, NOR and XNOR work as words. Implication is ->, →, => or IMPLIES, and if-and-only-if is <->, ↔, ≡, == or IFF. A leading F = just names the output. 0 and 1 are constants.
Single letters are variables, so abc means a AND b AND c, and ABCDE is five variables. A name with a digit, mixed case or more than eight letters stays whole, so x1, Rain and sprinkler each count as one variable. A run of nine capitals, like ABCDEFGHI, is refused, since that would be one variable more than fits. Case counts, so a and A are two different variables. Up to eight variables fit, a table of 256 rows.
How it simplifies
Rewriting by hand with the laws (absorption, De Morgan, consensus) works, but it's easy to stop before the shortest form. This calculator does it the systematic way instead, with the Quine–McCluskey method. It lists every row where the expression is true, then merges pairs of rows that differ in just one variable, since ABC + ABC' is just AB. Merging repeats until nothing more merges. What's left are the prime implicants, the largest groups possible.
Some prime implicants are essential: they're the only way to cover one of the true rows, so they must be in the answer. If they don't cover everything, the calculator tries every combination of the rest and keeps the one with the fewest terms, then the fewest letters. The working lists each stage, so you can check it against your own.
Which operator goes first
NOT binds tightest, then AND, then XOR, then OR. So A + BC' means A OR (B AND (NOT C)). Brackets override it as usual. Implication comes after OR, and if-and-only-if is loosest of all. A -> B -> C is read from the right, as A -> (B -> C). NAND sits with AND and NOR with OR, and a chain of them is read left to right, which matters because NAND and NOR aren't associative: (A NAND B) NAND C isn't the same as A NAND (B NAND C). Bracket chains of them to be sure.
From Boole to relays
George Boole set out an algebra of logic in 1854, in An Investigation of the Laws of Thought, with true and false treated as quantities that could be added and multiplied. For eighty years it stayed a branch of logic. Then Claude Shannon, a master's student at MIT, showed in his thesis, published as a paper in 1938, that circuits of relays and switches obey the same rules. Switches in series act as AND and switches in parallel as OR. Boolean algebra could simplify a telephone exchange, and relays could solve Boolean algebra. Every digital circuit since has been designed this way.
Questions
How do I simplify a Boolean expression?
Type it in. The answer is the minimal sum of products, found by the Quine–McCluskey method, with each stage in the working.
What is A + AB simplified?
A. If A is true the whole thing is true, and if A is false AB is false too, so B makes no difference. This is the absorption law.
Is the simplified answer the only one?
Not always. Some functions have two or more minimal forms of the same size, and the calculator shows one of them. Any of them is correct, and the truth tables match.
What do Σm and ΠM mean?
Σm lists the minterms, the row numbers where the output is 1. ΠM lists the maxterms, the rows where it's 0. Row numbers count from 0 with the variables read as a binary number, A first.
Sources
- Wikipedia: Quine–McCluskey algorithm
- Wikipedia: Karnaugh map
- Wikipedia: A Symbolic Analysis of Relay and Switching Circuits
- Wikipedia: The Laws of Thought
- George Boole, An Investigation of the Laws of Thought (1854), Project Gutenberg
- Claude Shannon, "A Symbolic Analysis of Relay and Switching Circuits", Transactions of the AIEE 57 (1938)
- Claude Shannon's MIT master's thesis, A symbolic analysis of relay and switching circuits (MIT DSpace)
- W. V. Quine, "The Problem of Simplifying Truth Functions", American Mathematical Monthly 59(8), 1952
- E. J. McCluskey, "Minimization of Boolean Functions", Bell System Technical Journal 35(6), November 1956
Added . Last updated and reviewed . What's new






