Simplifying step by step
A method for making an expression smaller, with two worked derivations and a way to check the answer.
Why make it smaller
Two equivalent expressions are two circuits that do the same job, and the shorter one uses fewer gates. Fewer gates means a cheaper chip, less power, and a signal that gets through sooner because it passes through fewer stages. It also means an expression a person can read. Simplifying is the process of using the laws to get from an expression you have been given to the shortest one that is equivalent to it.
The method
Simplifying by hand is a loop with four moves. Write the expression down. Look for a law that fits some part of it. Apply it, writing the new line and the name of the law beside it. Repeat until no law fits. The only skill is the looking, and it helps to look in a fixed order:
- A NOT over a bracket? Push it in with De Morgan. Nothing else can be done while it sits there.
- A constant? Identity removes it, or annulment collapses the term.
- The same term twice? Idempotence drops one. A term next to its own NOT? Complement collapses them.
- A term that contains another term of the expression? Absorption deletes the longer one.
- Two terms that are the same except one has a letter and the other its NOT? The redundancy law, below.
- Only when nothing else fits, multiply a bracket out with the distributive law and look again.
Two worked derivations
Both of the derivations below are produced by the same step engine that runs the calculator, so every line is a real rewrite and the law beside it is the one that made it. The first starts from two brackets and multiplies them out.
Worked example. Simplify (a ∨ b) ∧ (a ∨ c).
- Start (a ∨ b) ∧ (a ∨ c)
- Distributivity (a ∨ c) ∧ a ∨ (a ∨ c) ∧ b multiplying a ∨ c into a ∨ b
- Absorption a ∨ (a ∨ c) ∧ b a ∨ c already needs a, so it adds nothing
- Distributivity a ∨ b ∧ a ∨ b ∧ c multiplying b into a ∨ c
- Absorption a ∨ b ∧ c b ∧ a already needs a, so it adds nothing
Notice that the expression got longer before it got shorter: multiplying out produces terms, and absorption then eats the ones that contain a. The result, a ∨ b ∧ c, is the second distributive law from the last lesson, run backwards.
The second starts with a NOT over a bracket, which is why De Morgan comes first.
Worked example. Simplify ¬(a ∨ b) ∨ ¬a ∧ b.
- Start ¬(a ∨ b) ∨ ¬a ∧ b
- De Morgan ¬a ∧ ¬b ∨ ¬a ∧ b negating an OR flips it to an AND and negates each term
- Redundancy ¬a ∧ ¬b ∨ ¬a ¬a ∧ ¬b already covers everything b rules out here
- Absorption ¬a ¬a ∧ ¬b already needs ¬a, so it adds nothing
Once the NOT is pushed in, both terms start with ¬a, and the rest follows the checklist: redundancy strips the letter that is doing no work, and absorption swallows what is left. Five gates have become a single inverter.
Now try one yourself, one click per law. Guess the next line before you reveal it.
Checking the answer with a truth table
A derivation can go wrong at any line, so the last move is always a check. Put the original and the result side by side and compare every row. If they agree on all of them, the derivation is right, whatever route it took. If they disagree anywhere, a step was wrong, and the row that disagrees usually points at which one.
Common mistake: cancelling a shared term
Given a ∧ b ∨ a ∧ c, it is tempting to "divide through by a" and write b ∨ c. There is no division in boolean algebra. What the shared a allows is the distributive law backwards, a ∧ (b ∨ c), which still contains the a, and that is as far as it goes. Set a to 0 and b to 1: the original gives 0, and b ∨ c would give 1.
When to stop
Stop when no law applies. That usually means you have the shortest form, but not always: the laws can get stuck in a form where the next improvement needs a step backwards first. The calculator settles it another way. Its minimiser works from the truth table, not from the laws, so it cannot get stuck the way a chain of rewrites can, and the site's worked examples show the two agreeing. If the calculator reaches the same form you did, you can stop. Note that the smallest form is not always unique: some functions have two equally short expressions, and either is a right answer.
Why?: why trust the calculator over the laws?
The laws are a search, and a search can miss things. The minimiser instead lists every row where the function is 1 and finds the fewest AND terms that cover exactly those rows, which is a counting problem with a definite answer. That method has a name, Quine-McCluskey, and the Karnaugh map in the next stage is the same idea done by eye.
What to remember
- Simplifying is a loop: look for a law, apply it, name it, repeat until none fits.
- Push NOTs in first, clear constants and repeats, then absorb, then multiply out only as a last resort.
- Redundancy: a ∨ ¬a ∧ b = a ∨ b. The ¬a does no work.
- Check the result against the original with a truth table, row by row.
- When no law fits you are usually done; the calculator's minimiser can confirm it.
Check yourself
Get 5 right in a row and the lesson is done. A wrong answer costs the run, not the lesson.
What is the simplest form of this expression?
d ∧ (b ∨ a) ∨ d ∧ ¬b
Already know this? and come back to the quiz any time.