gizmobench

Boolean Algebra Calculator

Type an expression and the simplification comes back with its working: A*B + A*B' + A'*B*C is three variables and eight rows, true on rows 3, 4, 5, 6, 7, and it simplifies to A + B*C. The steps under the panel name the law each one used, so you can follow the expansion to those five rows, the two merging rounds, the second of which is where A*B and A*B' lose the B, and the covering step that keeps the two prime implicants A and B*C because each covers a row the other does not. Every one of those lines is read back and evaluated against all eight rows before it is drawn, which is why the panel can say the simplified form is proved row by row rather than asking you to trust it. Ask for a product of sums instead and the same expression comes back as (A + B)*(A + C), worked out on the complement and turned round by De Morgan. Up to eight variables, which is 256 rows; a dense expression whose selection chart passes the search bound comes back correct, unminimised and labelled as such, rather than quietly smaller and wrong.

expression3 variables

A*B + A*B' + A'*B*C

reads as (((A AND B) OR (A AND (NOT B))) OR (((NOT A) AND B) AND C))

minterms 3,4,5,6,7

A + B*C: 2 terms, 3 literals, proved equal to your expression on all 8 rows.
ABCout
0000
0010
0100
0111
1001
1011
1101
1111
simplifiedSOP

A + B*C

prime implicants
  • A1 - -
  • B*C- 1 1

same table, proved row by row, 8 of 8

POS form (A + B)*(A + C)

Simplified
A + B*C
Variables
3
Minterms
3,4,5,6,7
Form
SOP

A + B*C: 2 terms, 3 literals, proved equal to your expression on all 8 rows.

Minimal: 2 terms and 3 literals, the smallest sum of products there is for this function, proved against every one of the 8 rows.

Your expression

Expression
Answer as

Every step, and the law it used

  1. ExpansionX = X*Y + X*Y'checked on 8 rows

    Every term is grown until it names all 3 variables, which leaves the sum of the 5 rows that are true.

    A'*B*C + A*B'*C' + A*B'*C + A*B*C' + A*B*C
  2. CombiningX*Y + X*Y' = Xchecked on 8 rows

    Round 1: every pair that differs in one variable is merged into a term of 2 literals, which leaves 5 terms in all.

    A*B' + A*B + A*C' + A*C + B*C
  3. CombiningX*Y + X*Y' = Xchecked on 8 rows

    Round 2: every pair that differs in one variable is merged into a term of 1 literal, which leaves 2 terms in all.

    A + B*C
  4. AbsorptionX + X*Y = Xchecked on 8 rows

    Nothing could be dropped: all 2 prime implicants are essential, each covering a row no other one covers.

    A + B*C

Type an expression and the simplification follows. AND, OR, NOT, XOR, NAND, NOR, -> for implies and <-> for if and only if all read the way the table further down lists them, so &&, |, ~, ^, => and <=> arrive at the same place, and a prime after a variable negates it, so A' is NOT A. NOT binds tightest, then AND, then XOR, then OR, then ->, then <->, which is the grouping the truth table generator uses, and the panel prints the reading it used in full brackets. Up to eight variables, which is 256 rows. Answers come back in the same notation, so any form the page gives you can go straight back into the box. Your expression is kept in this browser so the page opens where you left it, and the Start over button at the top of the page forgets it.

NOT binds tightest, then AND and NAND, then XOR and XNOR, then OR and NOR, then ->, then <->. A chain of -> groups to the right, every other chain groups to the left.

Answers are printed with * for AND, + for OR and a trailing ' for NOT, which is notation this page reads, so any form it gives you can go straight back into the box.

  • A + A*Babsorption
    A
  • A*B + A*B' + A'*B*CQuine-McCluskey
    A + B*C
  • Past the search boundeight dense variables
    213 terms: correct, unminimised and labelled

The laws it names

LawIdentityWhere it is used
ExpansionX = X*Y + X*Y'grows every term until it names all of the variables, which turns the expression into the sum of the rows that are true
CombiningX*Y + X*Y' = Xtwo terms that differ in one variable lose that variable, which is the whole of the Quine-McCluskey merge
AbsorptionX + X*Y = Xa term whose rows the kept terms already cover adds nothing, so the covering step drops it
ComplementX + X' = 1 and X*X' = 0the rows where your expression is false are the rows where its complement is true, which is where a product of sums is worked out
De Morgan(X + Y)' = X'*Y' and (X*Y)' = X' + Y'turns the simplified complement back the right way round, every product becoming a sum

What you can type

OperatorBindsAlso writtenTrue when
NOT1NOT ! ~ ¬ p'true when the one side is false
AND2AND && & ∧ * . ·true only when both sides are true
NAND2NAND ↑false only when both sides are true
XOR3XOR ^ ⊕ != ≠true when the two sides differ
XNOR3XNORtrue when the two sides match
OR4OR || | ∨ +true when either side is true, or both
NOR4NOR ↓true only when both sides are false
->5-> => → ⇒ ⊃ > IMPLIESfalse only when the left side is true and the right side is false
<->6<-> <=> ↔ ⇔ ≡ = == IFF EQUIVtrue when the two sides match
Accuracy. The truth table is exact Boolean evaluation of your expression, and every simplification is proved equivalent against that table before it is shown. Minimisation is Quine-McCluskey with Petrick selection inside a bounded search: when an expression is too large for that bound the page returns a correct but unminimised form and tells you which of the two happened, rather than quietly handing you a smaller expression that is wrong. The table, the working and the figures are one run of the same code, so nothing under the panel can disagree with the panel.

Common questions

How do you simplify A + A*B?
It comes back as A. The page works it the same way it works everything else: A + A*B is true on rows 2 and 3 of a two variable table, so it expands to A*B' + A*B, those two terms differ only in B and merge into A by the combining law X*Y + X*Y' = X, and the covering step finds one prime implicant that covers both true rows. A is then evaluated against all four rows of the original before it is shown. Two neighbours of that question land in the same place: A*(A + B) is also A, and A + A'*B comes back as A + B.
Is the answer really the smallest expression?
Inside the search bound, yes, and the page says which of the two you got. Every prime implicant is enumerated by Quine-McCluskey, rows that only one prime can cover make that prime essential, dominated rows and dominated primes are dropped, and what is left is Petrick's selection, expanded as a search that keeps the cheapest cover by term count and then by literal count. For A*B + A*B' + A'*B*C there are two prime implicants, A and B*C, both essential, so the answer A + B*C is 2 terms and 3 literals and nothing shorter exists. When a chart is past the bound of 40,000 branches the page returns the canonical form instead, correct and labelled as not minimised.
What is the difference between sum of products and product of sums?
They are two shapes of the same function. A sum of products is ORs of ANDs, one term per group of rows that are true: A + B*C. A product of sums is ANDs of ORs, one factor per group of rows that are false: (A + B)*(A + C). Those two are the same eight row table, which the page proves for each of them separately. The product of sums is worked out on the complement, the rows where your expression is false, and then turned round by De Morgan, so the steps for it start with the complement and end with the flip.
How do I know the simplified expression is right?
Because the page checks it rather than trusting the rewrite. Every line of the working, and both final forms, are parsed back from the text you can see and evaluated at every row of the table, then compared with the original expression row by row. The panel reports that as proved row by row, 8 of 8 for a three variable expression. A rewrite that did not reproduce the table would not be shown at all: the page would say so and ask for the expression instead, because a smaller expression that is wrong is worse than no simplification.
How many variables can it handle?
Eight, which is 256 rows and the whole table drawn, not a sample. A ninth variable is refused by name with the number in the message, 512 rows, rather than being left to lock up the page. Inside eight variables the limit that bites first is the selection chart, not the table: a dense function can have over a hundred prime implicants and a cyclic core that the search cannot finish inside its bound, and then the page returns the canonical sum of products, correct and labelled, instead of a guess.
Which symbols can it read?
The words AND, OR, NOT, XOR, NAND, NOR, XNOR, IMPLIES and IFF in any case, and the symbols beside them in the table under the tool: &&, &, * and . for AND, ||, |, + for OR, !, ~ for NOT, ^ for XOR, -> and => for implies, and <->, <=> for if and only if. A prime after a variable or a bracket negates it, so A' is NOT A. NOT binds tightest, then AND, then XOR, then OR, then implies, then the biconditional, and the panel prints the reading it used in full brackets so the grouping is never a guess. It is the notation the truth table generator on this site reads, and the answers come back written the same way.
Why will it not simplify A XOR B?
Because A'*B + A*B' really is the smallest sum of products for it. Simplification works by merging rows that differ in one variable, and the two rows where exclusive or is true, 01 and 10, differ in both. Both terms are prime implicants, both are essential, and the covering step drops neither. The page says as much in the working rather than leaving the answer looking like a failure. Exclusive or over three variables behaves the same way and comes back with four terms.
Does it drop a redundant term?
Yes, and it names the law that lets it. A*B + A'*C + B*C has three prime implicants, A'*C, A*B and B*C, and the third is the consensus of the other two: every row it covers is already covered, so the covering step drops it by absorption, X + X*Y = X, and the answer is A'*C + A*B. The step that did it says how many prime implicants were essential and how many terms were dropped, and the result is checked against all eight rows like every other line.
Is my expression sent anywhere?
No. The parsing, the table, the minimisation and the proof all happen in your browser, there is no account and nothing is uploaded. Your expression and the form you chose are kept in this browser's own storage so the page opens where you left it, and the Start over button at the top of the page forgets them. If your browser blocks storage the tool still works: it opens on the example every time.

The truth table is exact Boolean evaluation of your expression, and every simplification is proved equivalent against that table before it is shown. Minimisation is Quine-McCluskey with Petrick selection inside a bounded search: when an expression is too large for that bound the page returns a correct but unminimised form and tells you which of the two happened, rather than quietly handing you a smaller expression that is wrong.