How to Simplify Boolean Expressions (Laws, K-Maps and Examples)

Last updated · Part of the Discretiq guides

Simplifying a Boolean expression means finding an equivalent expression with fewer terms and fewer variables. In digital design that means fewer gates, lower cost and a faster circuit; in programming it means a clearer condition.

There are three practical ways to do it: apply the algebra laws, draw a Karnaugh map, or run the Quine–McCluskey procedure. Whatever you use, always confirm the result with a truth table.

The laws you will use most

LawAND formOR form
IdentityA·1 = AA + 0 = A
NullA·0 = 0A + 1 = 1
IdempotentA·A = AA + A = A
ComplementA·A′ = 0A + A′ = 1
AbsorptionA·(A + B) = AA + A·B = A
DistributiveA·(B + C) = A·B + A·CA + B·C = (A + B)·(A + C)
De Morgan(A·B)′ = A′ + B′(A + B)′ = A′·B′

Unlike ordinary algebra, the OR form of the distributive law also holds: A + B·C = (A + B)·(A + C). Another useful identity is the consensus rule: AB + A′C + BC = AB + A′C.

A reliable method

  1. Write the expression as a sum of products (OR of AND terms).
  2. Look for terms that differ in exactly one variable and factor them: AB + AB′ = A(B + B′) = A.
  3. Apply absorption and the complement law to remove redundant terms and variables.
  4. Check the result with a truth table. If the last columns match row for row, the two expressions are equivalent.

Example 1: AB + AB′ + A′B

  1. AB + AB′ = A(B + B′) = A·1 = A.
  2. So the expression becomes A + A′B.
  3. Use the OR distributive law: A + A′B = (A + A′)(A + B) = 1·(A + B) = A + B.

Answer: A + B. A truth table confirms it: both expressions are 1 for the inputs 11, 10 and 01 and 0 for 00.

Example 2: the consensus term

Simplify AB + A′C + BC.

  1. Multiply BC by (A + A′), which equals 1: BC = ABC + A′BC.
  2. ABC is absorbed by AB (AB + ABC = AB), and A′BC is absorbed by A′C (A′C + A′BC = A′C).

Answer: AB + A′C. The term BC was redundant.

Example 3: a Karnaugh map

Simplify F(A, B, C) = Σm(0, 1, 3, 7), the function that is 1 for the inputs 000, 001, 011 and 111. Arrange the cells with the columns in Gray-code order (00, 01, 11, 10) so neighbouring cells differ in one variable:

A \ BC00011110
01110
10010
  1. Group the two 1s in the top row, columns 00 and 01. They share A = 0 and B = 0, giving A′B′.
  2. Group the two 1s in the column 11. They share B = 1 and C = 1, giving BC.
  3. Every 1 is covered, and both groups are needed (m0 only appears in the first, m7 only in the second).

Answer: F = A′B′ + BC. Groups must be rectangles of size 1, 2, 4 or 8, and the edges of the map wrap around.

When there are more variables: Quine–McCluskey

Karnaugh maps are practical up to about four variables. For more, the Quine–McCluskey method does the same job systematically: list the minterms in binary, repeatedly combine pairs that differ in one bit, then choose the fewest prime implicants that cover every minterm. The Boolean algebra calculator shows each grouping step.

Common mistakes

  • Applying De Morgan's law without swapping AND and OR.
  • Treating A + A as 2A. In Boolean algebra A + A = A.
  • Drawing K-map groups whose size is not a power of two, or forgetting that the edges wrap around.
  • Stopping too early: after simplifying, look again for terms that can be factored or absorbed.
  • Never checking the final answer against a truth table.

Try it yourself

Work the examples above by hand first, then confirm your answers.

Check your answer with the free Boolean algebra calculator