Boolean Algebra Simplifier

Reduce any Boolean expression to its minimal sum of products and product of sums, with every prime implicant and a row-by-row truth table check.

Expression

Write variables as single letters. AND can be AB, A·B, A*B or A AND B; OR is A + B or A OR B; NOT is A', !A or NOT A; XOR, NAND and NOR also work.
Insert an operator

Up to 6 different variables and 2,000 characters. The constants 0 and 1 are allowed.

Try an expression

Minimal form

Your minimal form will appear here

Type a Boolean expression to see its simplest sum of products, its product of sums, and how they were found.

Type a Boolean expression to simplify it.

Expressions are simplified in this browser and never leave your device.

FAQ

Which ways of writing an expression are understood?

All common conventions, mixed freely: engineering style (AB + A'C, with implicit AND and the prime for NOT), programming style (A && !B || C, A ^ B), logic symbols (¬ ∧ ∨ ⊕ ⊼ ⊽) and plain words (A AND B OR NOT C, NAND, NOR). Multi-letter runs such as ABC mean A AND B AND C, and the words AND, OR, NOT, XOR, NAND, NOR are always read as operators.

How is the minimal form found?

The tool builds the full truth table, merges neighbouring 1-rows into prime implicants (the Quine–McCluskey method), keeps the essential ones and closes any remaining rows with an exact minimum cover. The result is guaranteed minimal for the sum-of-products form — it is not a heuristic — and the same procedure on the 0-rows produces the product of sums.

What is the difference between the SOP and POS results?

Both describe the same function. The sum of products (SOP) ORs together AND-terms, such as AB' + BC, and maps directly to AND–OR circuits; the product of sums (POS) ANDs together OR-factors, such as (A + B)(B' + C), and maps to OR–AND circuits. Depending on the function, one form can need fewer gates than the other, so the tool always shows both.

Why are at most 6 variables supported?

Six variables already produce a 64-row truth table, which is about the limit of what is still readable and checkable by hand. Beyond that, minimization keeps working in theory, but the derivation and table this page is built around stop being useful as evidence. Logic-design software with file output is the better fit for wider functions.

Simplifying Boolean Logic with the Quine–McCluskey Method

Boolean algebra serves as the mathematical foundation of digital logic design, computer programming, and formal logic. Simplifying these expressions manually is often tedious and prone to calculation errors. The Boolean Algebra Simplifier provides an automated, exact method to reduce any Boolean expression of up to 6 variables down to its simplest mathematical forms.

By entering an expression, you receive both the minimal sum of products (SOP) and the minimal product of sums (POS). The tool also generates a step-by-step derivation of the minimization process, lists all prime implicants, and outputs a complete truth table to verify the simplified results against the original input.


Supported Boolean Notation Systems

Different fields of study write Boolean algebra using different symbols. To accommodate students, engineers, and programmers, the simplifier accepts a wide variety of notation styles, which can be mixed freely within a single expression:

  • AND (Conjunction): Can be written implicitly by placing variables next to each other (such as AB), or explicitly using A·B, A*B, A AND B, A && B, or logic symbols. Multi-letter runs like ABC are interpreted as A AND B AND C.
  • OR (Disjunction): Can be written as A + B, A OR B, A || B, or logic symbols.
  • NOT (Negation): Can be written as A', !A, NOT A, ¬A, or a prime symbol.
  • XOR (Exclusive OR): Can be written as A ^ B, A XOR B, or A ⊕ B.
  • NAND: Can be written as A NAND B or .
  • NOR: Can be written as A NOR B or .
  • Constants: The logical constants 0 and 1 are fully supported.

SOP vs. POS in Circuit Design

When designing physical digital circuits, choosing between a Sum of Products (SOP) and a Product of Sums (POS) layout directly impacts the number of logic gates required.

  • Sum of Products (SOP): This form ORs together AND-terms (for example, AB' + BC). In hardware, this maps directly to an AND-OR gate implementation.
  • Product of Sums (POS): This form ANDs together OR-factors (for example, (A + B)(B' + C)). In hardware, this maps directly to an OR-AND gate implementation.

Depending on the specific distribution of minterms and maxterms in a truth table, one form will often yield a simpler circuit with fewer gates than the other. Having both minimal forms calculated side-by-side allows designers to compare and select the most efficient physical implementation.


Understanding Prime Implicants and Exact Minimization

Unlike heuristic minimization methods that may approximate a solution, this tool uses the Quine–McCluskey algorithm to find the exact minimum cover. The minimization process follows a structured mathematical sequence:

  1. Minterm Expansion: The tool evaluates the input expression across all possible variable combinations to identify the rows where the output equals 1 (minterms, denoted as Σm) and where it equals 0 (maxterms, denoted as ΠM).
  2. Merging Adjacent Rows: The algorithm systematically merges neighbouring 1-rows that differ by only a single variable. This process is repeated as far as possible to eliminate redundant literals.
  3. Identifying Prime Implicants: The remaining unmergeable terms are the prime implicants.
  4. Finding Essential Prime Implicants: The tool determines which prime implicants are "essential"—meaning they are the only available cover for at least one specific 1-row.
  5. Solving the Minimum Cover: If any 1-rows remain uncovered by the essential prime implicants, the algorithm selects the fewest extra prime implicants needed to cover the remaining rows.

The same systematic merge is run on the 0-rows to derive the minimal product of sums.


The Limits of Manual Simplification

While manual simplification tools like Karnaugh Maps (K-maps) are excellent for learning, they become difficult to manage when an expression contains more than 4 variables. A 4-variable K-map requires a grid of 16 cells. Adding a fifth variable requires a 32-cell three-dimensional grid, and a sixth variable requires 64 cells, making manual grouping highly susceptible to human error.

A 6-variable expression produces a 64-row truth table, which represents the practical limit for human-readable verification. The simplifier enforces a limit of 6 unique variables and 2,000 characters to ensure that the step-by-step derivation and truth table remain clear, readable, and useful for educational verification.


Interface Diagnostics and Output Labels

When you input an expression, the tool displays several dedicated output panels to explain the mathematical reduction:

  • Read as: Displays the normalized interpretation of your input expression so you can verify the tool understood your syntax.
  • Minimal sum of products (SOP): Displays the final simplified SOP expression.
  • Minimal product of sums (POS): Displays the final simplified POS expression.
  • At a glance: A diagnostics panel showing the detected Variables, the count of Rows equal to 1, the total Prime implicants, the Essential prime implicants, the change in literal count (Literals, before → after), and the minimization Method (which displays "Quine–McCluskey, exact minimum cover").
  • How it was simplified: A step-by-step text breakdown detailing the variable count, the minterm and maxterm rows, the list of prime implicants, the essential prime implicants, how uncovered rows were resolved, and the final verification status.
  • Truth table: A complete table showing columns for the variables, the original Expression, and the simplified Minimal SOP to visually confirm they match on every single row.

Local Browser Processing and Privacy

All calculations and algebraic simplifications are performed directly within your web browser. No data or expressions are uploaded to an external server. This local processing ensures that your work remains entirely on your own device.