digiwleea Tools
Learn Open the lab →

Boolean algebra simplifier

Boolean simplification rewrites a logic expression into an equivalent one with fewer terms, so the same function needs fewer gates. Simplify any boolean expression to its shortest form: type an expression using AND, OR, NOT, XOR and parentheses, and this calculator builds its truth table and reduces it to the minimal sum of products. For example, A AND B OR A AND NOT B simplifies to just A.

How to use it

Type your expression in the box. Use single letters A to H for the variables and any of these operators: AND (also &, *, or just writing two variables together like AB), OR (also + or |), NOT (also !, ~, or a trailing apostrophe like A'), plus XOR, NAND, NOR, and XNOR. The simplified result updates as you type.

The result is shown in sum-of-products form, F = a list of product terms joined by +, with a trailing apostrophe marking a negated variable. Below it you get the list of variables found and how many input rows are true. Up to eight variables (A to H) are supported.

Worked example: A AND B OR A AND NOT B

Written with algebra symbols this is A·B + A·B'. Both terms start with A, so factor it out: A·(B + B'). A variable ORed with its own negation is always true, so B + B' = 1, which leaves A·1 = A.

The tool reaches the same answer a different way: it tabulates the expression for all four combinations of A and B, sees the output is 1 exactly when A is 1 (regardless of B), and the Quine-McCluskey minimizer collapses those two rows into the single term A. So A AND B OR A AND NOT B = A.

How the simplification works

Every boolean expression, no matter how it is written, is fully described by its truth table: the list of which input combinations make it true. Two expressions that produce the same truth table are equal, so simplifying means finding the shortest expression with that exact table.

This tool computes the truth table, then runs the Quine-McCluskey algorithm, the tabular cousin of the Karnaugh map. It repeatedly merges pairs of true rows that differ in a single variable (so that variable can be dropped), collecting the largest groups, then picks a small set of those groups that still covers every true row. The result is the minimal sum of products, which maps straight onto a two-level AND-then-OR circuit you can build in the lab.

Frequently asked

How do I simplify a boolean expression?

Build the truth table of the expression, then group the rows that output 1 into the largest possible blocks where one variable can be dropped. The Quine-McCluskey method does this exactly, producing the shortest sum of products. This tool runs it for you: type the expression and read off the minimized result.

What is sum of products (SOP) form?

Sum of products is an OR of ANDs: each product term is a group of variables ANDed together (some possibly negated), and the whole function is those terms ORed. For example A·B + A·C is in sum-of-products form. It maps directly to a two-level AND-OR gate circuit.

Is A AND B OR A AND NOT B really just A?

Yes. A·B + A·B' factors to A·(B + B'), and B + B' is always 1, so the whole expression equals A. The simplifier finds this automatically: the output of A AND B OR A AND NOT B is A.

Turn the simplified expression into real gates: open the lab and wire it up. To go deeper, read the theory on boolean algebra and Karnaugh maps.

Related tools: truth table generator and Karnaugh map solver.

Open the lab →

Embed this tool

Free to embed in your course page, blog, or notes: just keep the credit link under the widget. Paste this where you want it:

<iframe src="https://digiwleea.wleeaf.dev/embed/tool/?w=boolean" width="100%" height="560" style="border:0;border-radius:12px;max-width:720px" title="Boolean expression simplifier" loading="lazy"></iframe>