LogicGates.org Open the simulatorSimulator

Boolean algebra simplification examples

12 expressions simplified one law at a time, in the order you would meet them: first the single moves, then the ones that combine, then consensus and a few that need several rounds. Every line names the law it applied, and every derivation is checked against the truth table.

  1. 1. A term that adds nothing
  2. 2. A literal that cannot matter
  3. 3. Two terms that differ in one literal
  4. 4. The same trick for a product of sums
  5. 5. A negated bracket
  6. 6. An XOR that turns out to be an OR
  7. 7. Three terms down to two
  8. 8. The consensus term
  9. 9. From a product of sums to a sum of products
  10. 10. Recognising an XOR
  11. 11. Four minterms that are one variable
  12. 12. An expression that is always true

The method

  1. Get the NOTs onto single variables. A NOT over a bracket blocks everything else; De Morgan pushes it in.
  2. Drop what is already covered. Absorption removes a term that a shorter term makes redundant; the redundancy law removes a literal that another term makes unnecessary.
  3. Merge terms that differ in one literal. a ∧ b and a ∧ ¬b together are just a. This is a Karnaugh map group written as algebra; in named laws it is redundancy followed by absorption.
  4. Multiply out last. Distribution makes an expression bigger before it gets smaller, so only reach for it when nothing else applies.
  5. Check the consensus. A term covered by two others together, such as b ∧ c next to a ∧ b and ¬a ∧ c, can go. It is the one step people miss.

1. A term that adds nothing

If a is already enough on its own, a ∧ b can never contribute a row that a does not. This is absorption, and it is the single most common simplification.

  1. Start a ∨ a ∧ b
  2. Absorption a a ∧ b already needs a, so it adds nothing

Result: a. The minimiser agrees, and the original and the result are both high on 2 of 4 rows.

2. A literal that cannot matter

Inside the bracket, ¬a is dead: the outer a is already required, so ¬a can never be true when the whole expression is. Drop it and the bracket collapses to a ∧ b.

  1. Start a ∧ (¬a ∨ b)
  2. Redundancy a ∧ b a already covers everything ¬a rules out here

Result: a ∧ b. The minimiser agrees, and the original and the result are both high on 1 of 4 rows.

3. Two terms that differ in one literal

The two terms agree on a and disagree on b, so between them they cover every value of b. That is exactly what a Karnaugh map group of two does; in the laws it takes two moves, redundancy to drop the ¬b and then absorption.

  1. Start a ∧ b ∨ a ∧ ¬b
  2. Redundancy a ∧ b ∨ a a ∧ b already covers everything ¬b rules out here
  3. Absorption a a ∧ b already needs a, so it adds nothing

Result: a. The minimiser agrees, and the original and the result are both high on 2 of 4 rows.

4. The same trick for a product of sums

The laws are dual: everything that works on an OR of ANDs works on an AND of ORs with the operators swapped. The two brackets differ only in b, so b cancels, by the same two moves as the previous example.

  1. Start (a ∨ b) ∧ (a ∨ ¬b)
  2. Redundancy (a ∨ b) ∧ a a ∨ b already covers everything ¬b rules out here
  3. Absorption a a ∨ b already needs a, so it adds nothing

Result: a. The minimiser agrees, and the original and the result are both high on 2 of 4 rows.

5. A negated bracket

Nothing can be simplified while the NOT sits over a bracket. De Morgan pushes it down onto the variables, and then redundancy and absorption finish the job.

  1. Start ¬(a ∨ b) ∨ ¬a ∧ b
  2. De Morgan ¬a ∧ ¬b ∨ ¬a ∧ b negating an OR flips it to an AND and negates each term
  3. Redundancy ¬a ∧ ¬b ∨ ¬a ¬a ∧ ¬b already covers everything b rules out here
  4. Absorption ¬a ¬a ∧ ¬b already needs ¬a, so it adds nothing

Result: ¬a. The minimiser agrees, and the original and the result are both high on 2 of 4 rows.

6. An XOR that turns out to be an OR

XOR is "one but not both"; add back the "both" case and you have "at least one", which is OR. The derivation has to expand the XOR into its definition before the ordinary laws can see that.

  1. Start a ⊻ b ∨ a ∧ b
  2. Definition a ∧ ¬b ∨ ¬a ∧ b ∨ a ∧ b XOR is high when exactly one of a and b is
  3. Redundancy a ∧ ¬b ∨ ¬a ∧ b ∨ a a ∧ ¬b already covers everything b rules out here
  4. Absorption ¬a ∧ b ∨ a a ∧ ¬b already needs a, so it adds nothing
  5. Redundancy a ∨ b a already covers everything ¬a rules out here

Result: a ∨ b. The minimiser agrees, and the original and the result are both high on 3 of 4 rows.

7. Three terms down to two

Redundancy is the workhorse here: a term can shed a literal when another term already covers the case that literal rules out. Two rounds of it, then absorption.

  1. Start a ∧ ¬b ∨ a ∧ b ∧ c ∨ ¬a ∧ ¬b
  2. Redundancy a ∧ ¬b ∨ a ∧ c ∨ ¬a ∧ ¬b a ∧ ¬b already covers everything b rules out here
  3. Redundancy a ∧ ¬b ∨ a ∧ c ∨ ¬b a ∧ ¬b already covers everything ¬a rules out here
  4. Absorption ¬b ∨ a ∧ c a ∧ ¬b already needs ¬b, so it adds nothing

Result: ¬b ∨ a ∧ c. The minimiser agrees, and the original and the result are both high on 5 of 8 rows.

8. The consensus term

The term b ∧ c looks necessary and is not: whenever it is true, either a ∧ b or ¬a ∧ c is true as well, depending on a. This is the one people miss by hand and the one a Karnaugh map makes obvious.

  1. Start a ∧ b ∨ ¬a ∧ c ∨ b ∧ c
  2. Consensus ¬a ∧ c ∨ a ∧ b b ∧ c is already covered by a ∧ b and ¬a ∧ c together

Result: ¬a ∧ c ∨ a ∧ b. The minimiser agrees, and the original and the result are both high on 4 of 8 rows.

9. From a product of sums to a sum of products

Multiplying out looks like it will make things worse, and it does at first. Two rounds of it, with redundancy and absorption trimming in between, and then consensus removes the last term. The third bracket was consensus all along.

  1. Start (a ∨ b) ∧ (¬a ∨ c) ∧ (b ∨ c)
  2. Distributivity (¬a ∨ c) ∧ (b ∨ c) ∧ a ∨ (¬a ∨ c) ∧ (b ∨ c) ∧ b multiplying (¬a ∨ c) ∧ (b ∨ c) into a ∨ b
  3. Redundancy c ∧ (b ∨ c) ∧ a ∨ (¬a ∨ c) ∧ (b ∨ c) ∧ b a already covers everything ¬a rules out here
  4. Absorption c ∧ a ∨ (¬a ∨ c) ∧ (b ∨ c) ∧ b b ∨ c already needs c, so it adds nothing
  5. Absorption c ∧ a ∨ (¬a ∨ c) ∧ b b ∨ c already needs b, so it adds nothing
  6. Distributivity c ∧ a ∨ b ∧ ¬a ∨ b ∧ c multiplying b into ¬a ∨ c
  7. Consensus ¬a ∧ b ∨ a ∧ c b ∧ c is already covered by c ∧ a and b ∧ ¬a together

Result: ¬a ∧ b ∨ a ∧ c. The minimiser agrees, and the original and the result are both high on 4 of 8 rows.

10. Recognising an XOR

"Not both, but at least one" is exactly exclusive or. De Morgan, one distribution and two redundancy steps turn the compact form into the sum of products that the definition of XOR uses.

  1. Start ¬(a ∧ b) ∧ (a ∨ b)
  2. De Morgan (¬a ∨ ¬b) ∧ (a ∨ b) negating an AND flips it to an OR and negates each term
  3. Distributivity (a ∨ b) ∧ ¬a ∨ (a ∨ b) ∧ ¬b multiplying a ∨ b into ¬a ∨ ¬b
  4. Redundancy b ∧ ¬a ∨ (a ∨ b) ∧ ¬b ¬a already covers everything a rules out here
  5. Redundancy ¬a ∧ b ∨ a ∧ ¬b ¬b already covers everything b rules out here

Result: ¬a ∧ b ∨ a ∧ ¬b. The minimiser agrees, and the original and the result are both high on 2 of 4 rows.

11. Four minterms that are one variable

Every term has ¬b and between them they cover every combination of a and c, so the whole thing is just ¬b. On a Karnaugh map this is one group of four; by hand it takes a run of redundancy and absorption steps.

  1. Start ¬a ∧ ¬b ∧ ¬c ∨ ¬a ∧ ¬b ∧ c ∨ a ∧ ¬b ∧ ¬c ∨ a ∧ ¬b ∧ c
  2. Redundancy ¬a ∧ ¬b ∧ ¬c ∨ ¬a ∧ ¬b ∨ a ∧ ¬b ∧ ¬c ∨ a ∧ ¬b ∧ c ¬a ∧ ¬b ∧ ¬c already covers everything c rules out here
  3. Redundancy ¬a ∧ ¬b ∧ ¬c ∨ ¬a ∧ ¬b ∨ ¬b ∧ ¬c ∨ a ∧ ¬b ∧ c ¬a ∧ ¬b ∧ ¬c already covers everything a rules out here
  4. Redundancy ¬a ∧ ¬b ∧ ¬c ∨ ¬a ∧ ¬b ∨ ¬b ∧ ¬c ∨ ¬b ∧ c ¬a ∧ ¬b already covers everything a rules out here
  5. Redundancy ¬a ∧ ¬b ∧ ¬c ∨ ¬a ∧ ¬b ∨ ¬b ∧ ¬c ∨ ¬b ¬b ∧ ¬c already covers everything c rules out here
  6. Absorption ¬a ∧ ¬b ∨ ¬b ∧ ¬c ∨ ¬b ¬a ∧ ¬b ∧ ¬c already needs ¬b, so it adds nothing
  7. Absorption ¬b ∧ ¬c ∨ ¬b ¬a ∧ ¬b already needs ¬b, so it adds nothing
  8. Absorption ¬b ¬b ∧ ¬c already needs ¬b, so it adds nothing

Result: ¬b. The minimiser agrees, and the original and the result are both high on 4 of 8 rows.

12. An expression that is always true

All four minterms of two variables are present, so the function is 1 on every row. The laws get there by collapsing the terms until a ∨ ¬a appears, and the complement law turns that into 1.

  1. Start a ∧ ¬b ∨ ¬a ∧ b ∨ a ∧ b ∨ ¬a ∧ ¬b
  2. Redundancy a ∧ ¬b ∨ ¬a ∧ b ∨ a ∨ ¬a ∧ ¬b a ∧ ¬b already covers everything b rules out here
  3. Absorption ¬a ∧ b ∨ a ∨ ¬a ∧ ¬b a ∧ ¬b already needs a, so it adds nothing
  4. Redundancy ¬a ∧ b ∨ a ∨ ¬a ¬a ∧ b already covers everything ¬b rules out here
  5. Complement 1 a and ¬a can never both be satisfied, giving 1

Result: 1. The minimiser agrees, and the original and the result are both high on 4 of 4 rows.

Try your own

The boolean algebra calculator produces the same kind of derivation for any expression you type, and checks whether two expressions are equivalent. For up to six variables the Karnaugh map solver shows the groups instead. The practice questions generate simplification exercises with instant marking.

Questions about simplifying

How do you simplify a boolean expression step by step?

Push any NOT that covers a bracket down onto the variables with De Morgan. Then look for a term that is a superset of another and drop it (absorption), for two terms that differ in a single literal and merge them, and for a literal that another term already makes redundant. Multiply out brackets only when nothing else applies. Repeat until no law fits; the result is a minimal sum of products.

Which boolean algebra laws are used most in simplification?

Absorption, which deletes a term already covered by a shorter one; redundancy, sometimes called the elimination or covering law, which drops a literal another term makes unnecessary; De Morgan, which moves negations inside brackets; distribution, which multiplies brackets out; and consensus, which removes a term that two others cover between them. The identity, idempotence and complement laws tidy up constants and repeats.

How do I know when an expression is fully simplified?

When no term can be dropped and no literal can be removed from any term without changing the truth table. The only certain check is the truth table itself: a minimiser such as the Karnaugh map or Quine-McCluskey finds a minimal cover from the table, and the calculator on this site compares your answer against it row by row.

Is the simplest form of a boolean expression unique?

Not always. Some functions have several sums of products with the same number of terms and literals, and a Karnaugh map shows this as more than one way to choose the groups. The truth table is unique; the minimal expression for it may not be.

Should I simplify by algebra or with a Karnaugh map?

Up to four variables a Karnaugh map is faster and harder to get wrong, because the groupings are visible. Algebra is what you need when an expression is given to you as brackets rather than as a table, when there are more than six variables, which is where maps stop being readable, and when the question asks for a derivation with the laws named.