Simplify Boolean algebra with work shown
Use this Boolean algebra simplifier to check a digital logic homework problem, prepare for a midterm, or compare equivalent gate expressions. Enter a function using single-letter variables and read its minimal sum of products and product of sums. The loaded example already has an answer. Under the editor, named law steps explain local changes, and a truth table checks the original function against every resulting form. Your expression stays in your browser.
Boolean algebra uses two values: false and true, usually written as 0 and 1. AND requires every input to be true; OR requires at least one. NOT reverses a value. XOR is true when its two inputs differ. This calculator supports these operations without treating a Boolean expression as executable JavaScript. It is intended for small, completely specified combinational functions in an introductory Digital Logic course.
Enter the expression your course uses
Write AB for A AND B, A + B for A OR B, and A' for NOT A. Word operators AND, OR, NOT and XOR work too. You can also use &, *, or · for AND, | for OR, ! or ~ for NOT, and ^ for XOR. Lowercase letters become uppercase, so a and A refer to the same input. Variable names are single letters: AB is a product, not a variable named AB.
NOT has the highest precedence, followed by AND, XOR and OR. A postfix apostrophe complements the preceding variable or parenthesized expression. Thus (A + B)' negates the whole sum. Parentheses are especially helpful when mixing XOR and OR because textbooks and software may choose different precedence rules. Constants 0 and 1 are accepted. Missing operands, unmatched parentheses and unsupported characters produce a correction instead of retaining an old answer.
Follow the named law steps
The trace applies associative, identity, domination, idempotent and complement laws along with double negation. De Morgan changes a complemented sum to a product of complements, or a complemented product to a sum of complements. Absorption removes a larger term already covered by a smaller one. Consensus identifies a redundant product or its dual redundant sum. Distributive factoring extracts a common factor. XOR expands using its definition before other rules apply.
Each displayed row is a real rewrite of the preceding expression, including changes inside parentheses. The calculator checks every row against the original function over all input assignments. The trace follows supported local rules; it is not an exhaustive search through possible algebraic proofs. A factored law result can be shorter to read while differing from the two-level minimal SOP. A function may therefore have a useful minimal answer even when no local rewrite applies.
Worked example: remove a consensus term
The loaded input is AB + A'C + BC. The library places its variables in alphabetical order: A, B, C. It checks eight assignments, from 000 through 111. The output column is 0, 1, 0, 1, 0, 0, 1, 1. After flattening the sum with the associative law, the consensus theorem removes BC, leaving AB + A'C. When B and C are both true, either A or its complement already makes one of the remaining products true.
The exact engine returns minimal SOP A'C + AB and minimal POS (A + C) · (A' + B). Both agree with the original on every row. Each form has two terms and four literals, where a literal is one variable or its complement. The order of the SOP products differs from the handwritten trace, but OR is commutative. Reordering terms does not change the function.
Understand what minimal means
SOP is an OR of AND products. POS is an AND of OR sums. The existing exact K-map minimizer chooses the fewest product terms, then the fewest literals among covers with that term count. For POS, the calculator minimizes the complement and applies De Morgan to obtain sum factors, using the same objective. These are separate minima within their respective two-level forms. Equally minimal covers can exist, so your instructor's expression may look different and still be correct.
This objective does not promise the fewest physical gates, lowest propagation delay or a hazard-free circuit. A multi-level factored implementation or XOR gate can be preferable in hardware. Removing a consensus term preserves the steady-state truth table but can affect static hazards when inputs change. Use the Karnaugh map solver to study grouping and the logic gate simulator to review individual gates.
Check limits and continue studying
Inputs support up to four distinct variables and 240 characters. The teaching trace has nesting, token, step and expression-size limits to keep browser work bounded. If the trace reaches its limit, the page says so; exact minimal forms and their truth-table checks remain available. There are no don't-care assignments in this tool. A constant function displays 0 or 1 rather than an empty product or sum.
Continue with the Digital Logic Lab, truth tables guide and Karnaugh map guide. Compare truth-table columns before comparing spelling or term order. Keep your own derivation beside the generated steps so you can explain which law justifies each change.