ToolSphere

Boolean Algebra Simplifier

Computer science

Simplify Boolean expressions step by step with named laws. Find minimal SOP and POS, then verify every result against the original truth table.

Minimal sum of products (SOP)

A'C + AB

Minimal product of sums (POS): (A + C) · (A' + B)

Equivalent on all 8 truth-table rows.

Use up to 4 single-letter variables. AB means A AND B; + means OR; ' means NOT. Precedence: NOT, AND, XOR, OR. Parentheses override it.

Named law steps

Parsed input: ((A · B) + (A' · C)) + (B · C)

  1. 1. Associative law

    ((A · B) + (A' · C)) + (B · C) = (A · B) + (A' · C) + (B · C)

    Verified against the original on every row.

  2. 2. Consensus theorem

    (A · B) + (A' · C) + (B · C) = (A · B) + (A' · C)

    Verified against the original on every row.

Law result: (A · B) + (A' · C)

The law trace uses local rewrites and may stop before a minimum. Exact SOP uses the K-map cover engine; POS minimizes the complement and applies De Morgan. Each minimizes term count, then literal count, within its own two-level form. Tied answers may differ.

Verify with a truth table

0 means false; 1 means true. Rows follow alphabetical variable order, with the leftmost variable changing slowest.

Original, law result, minimal SOP and minimal POS outputs
ABCOriginalLaw resultSOPPOS
0000000
0011111
0100000
0111111
1000000
1010000
1101111
1111111

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

How to use Boolean Algebra Simplifier

  1. 1Start with the loaded consensus example or enter an expression using up to four single-letter variables.
  2. 2Use AND, OR, NOT and XOR, or write products as AB, sums with + and complements with an apostrophe. Add parentheses to set the order.
  3. 3Read minimal SOP and POS above the editor, then follow the named law steps below it.
  4. 4Compare the original, law result, SOP and POS columns in the truth table. Copy results to keep the expressions and work shown.

About Boolean Algebra Simplifier

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.

Guides and tutorials

Frequently asked questions

How do I simplify Boolean algebra step by step?

Enter the expression and follow the named law rows below the editor. Each row shows its before and after expressions and is checked against the original truth table. Exact minimal SOP and POS appear above the editor.

Can I enter AND, OR, NOT and XOR?

Yes. Use word operators or &, *, ·, |, +, !, ~ and ^. Juxtaposition means AND and a postfix apostrophe means NOT. Variables are single letters and are case insensitive.

What is the operator precedence?

NOT comes first, then AND, XOR and OR. A postfix apostrophe applies to the preceding variable or parenthesized expression. Use parentheses whenever your course uses a different convention.

Does it show De Morgan's law?

Yes. Complemented sums become products of complements and complemented products become sums of complements. Choose the De Morgan example to see a verified rewrite.

What is the consensus theorem?

AB + A'C + BC equals AB + A'C. The BC term is redundant because either A or its complement already covers its true rows. The tool also recognizes the dual product-of-sums pattern.

Are SOP and POS guaranteed minimal?

Each uses an exact cover minimizing term count first and literal count second within that two-level form. POS is obtained by minimizing the complement. Tied covers may differ; minimum hardware cost is a separate problem.

Why is the law result different from minimal SOP?

Local law rewrites can produce factored expressions or stop before a minimum. The exact cover calculation is separate from the teaching trace. The truth table checks both results against the original function.

How many variables can I use?

Use up to four distinct single-letter variables and 240 characters. Nesting is limited to 32, input tokens to 160, and the teaching trace to 60 rewrites with at most 1,000 expression nodes after each rewrite.

Can I include don't-care conditions?

No. This expression tool treats every input assignment as specified. Its truth table checks every row, including variables that disappear after simplification.

Does removing consensus terms make a circuit hazard free?

No. Equivalent steady-state truth tables do not guarantee identical transient behavior. A redundant consensus term can help suppress a static hazard; check timing and implementation separately.

Have a suggestion for Boolean Algebra Simplifier?Share your feedback ↗