# Boolean Algebra Calculator

> Free Boolean algebra calculator with step-by-step solutions. Simplify boolean expressions, generate truth tables, find minterms/maxterms, Karnaugh maps.

**URL:** https://calculators.im/boolean-algebra-calculator  
**Category:** math  
**Last updated:** 2026-07-03  

Evaluate, simplify, and analyze boolean expressions with step-by-step solutions. Generate truth tables, find minterms and maxterms, create SOP/POS canonical forms, and visualize Karnaugh maps. Supports AND, OR, NOT, XOR, NAND, NOR, XNOR for up to 4 variables.

Our Boolean Algebra Calculator handles all digital logic and boolean algebra operations in one place. Enter any boolean expression using standard operators — AND, OR, NOT, XOR, NAND, NOR, XNOR — and instantly get the truth table, minterms, maxterms, canonical SOP and POS forms, and a minimized expression using the Quine-McCluskey algorithm. The Karnaugh map visualizer highlights which cells are minterms, making it easy to identify groupings and simplifications.

## Formula

```
F = Σm(minterms) = Πm(maxterms)
```

**Variables:**

- **A, B, C, D** — Boolean input variables (0 or 1)
- **AND (·)** — Logical AND — output 1 only if both inputs are 1
- **OR (+)** — Logical OR — output 1 if at least one input is 1
- **NOT (')** — Logical NOT — inverts the input
- **XOR (⊕)** — Exclusive OR — output 1 if inputs differ
- **SOP** — Sum of Products — OR of AND terms (minterms)
- **POS** — Product of Sums — AND of OR terms (maxterms)

A boolean function is fully defined by its truth table. SOP canonical form: OR of all minterms (rows where output = 1). POS canonical form: AND of all maxterms (rows where output = 0). The Quine-McCluskey algorithm minimizes SOP by grouping minterms that differ by one variable.

## Worked Example

### Example: Simplify A·B + A·B'

A·B + A·B' simplifies to A using the complement law: B + B' = 1.

## How to Use the Boolean Calculator

1. **Enter Expression** — Type your boolean expression using * (AND), + (OR), ' or ! (NOT), ^ (XOR). Variables are single letters A-Z.
2. **View Truth Table** — The truth table is generated automatically for all variable combinations (up to 4 variables = 16 rows)
3. **Check K-map** — The Karnaugh map highlights minterms (1s) making it easy to spot groupings for simplification
4. **Get Simplified Form** — See the minimal SOP expression from the Quine-McCluskey algorithm along with canonical SOP/POS forms

## Pro Tips

- Use * or · for AND, + for OR, ' or ! for NOT, ^ for XOR
- Complement law: A + A' = 1, A · A' = 0 — use this to eliminate variables
- De Morgan's: (A·B)' = A'+B' and (A+B)' = A'·B'
- Absorption: A + A·B = A and A·(A+B) = A
- Group minterms in powers of 2 (1, 2, 4, 8) on the Karnaugh map for minimal SOP
- NAND and NOR are universal gates — any boolean function can be built from just NAND

## Frequently Asked Questions

### How do you simplify a boolean expression?

Use boolean algebra laws: (1) Complement: A·A' = 0, A+A' = 1; (2) Absorption: A+A·B = A; (3) De Morgan's: (A·B)' = A'+B'; (4) Consensus: A·B + A'·C + B·C = A·B + A'·C. For systematic minimization, use the Quine-McCluskey algorithm or Karnaugh maps.

### What is a truth table in boolean algebra?

A truth table lists all possible combinations of input variables (0s and 1s) and the corresponding output for each combination. For n variables there are 2^n rows. For example, 2 variables A and B have 4 rows: 00, 01, 10, 11.

### What is SOP (Sum of Products) form?

SOP is a canonical form where the boolean function is expressed as an OR (sum) of AND (product) terms. Each AND term is a minterm — a row where the output is 1. Example: F = A'B + AB' is in SOP form. The canonical (full) SOP includes all variables in each term.

### What is a Karnaugh map (K-map)?

A Karnaugh map is a visual method for simplifying boolean expressions. Variables are arranged in a grid using Gray code ordering (00, 01, 11, 10) so adjacent cells differ by exactly one variable. Group 1s in powers of 2 (1, 2, 4, 8) to eliminate variables and find the minimal SOP.

### What is De Morgan's theorem?

De Morgan's laws state: (1) (A·B)' = A' + B' — the complement of an AND is an OR of complements; (2) (A+B)' = A'·B' — the complement of an OR is an AND of complements. These are used to convert between NAND/NOR expressions and AND/OR expressions.

### What are minterms and maxterms?

A minterm is a product term where the function equals 1. A maxterm is a sum term where the function equals 0. For n variables, there are 2^n possible minterms (m0 to m_{2^n-1}). A boolean function can be expressed as a sum of minterms (SOP) or product of maxterms (POS).

### How does the Quine-McCluskey algorithm work?

Quine-McCluskey systematically minimizes boolean functions: (1) List all minterms as binary numbers; (2) Group by number of 1-bits; (3) Combine adjacent groups (differ by 1 bit) and mark with a dash; (4) Repeat until no more combinations; (5) Uncombined terms are prime implicants; (6) Select minimum set of essential prime implicants to cover all minterms.

## Deep Dive

Boolean algebra is the mathematical foundation of digital electronics, computer science, and logic circuit design. Every processor, memory chip, and programmable logic device relies on boolean operations — AND, OR, NOT, XOR, NAND, NOR — to process binary data. Engineers and computer science students routinely need to simplify boolean expressions to minimize gate counts, reduce circuit complexity, and optimize power consumption. A single 4-variable function can have up to 16 rows in its truth table and dozens of possible simplifications. Manual simplification using De Morgan's theorems, consensus, and absorption laws is tedious and error-prone, especially under exam conditions. This boolean algebra calculator automates the entire workflow: enter any expression with up to four variables, and it instantly produces the complete truth table, identifies all minterms and maxterms, generates canonical Sum-of-Products (SOP) and Product-of-Sums (POS) forms, applies the Quine-McCluskey algorithm for guaranteed minimal expressions, and renders a color-coded Karnaugh map for visual verification. Whether you are designing combinational logic for an FPGA, verifying homework problems, or preparing for a digital logic exam, this tool replaces hours of manual work with accurate, step-by-step results.

### What is a Boolean Algebra Calculator?

A **boolean algebra calculator** evaluates and simplifies logical expressions using the rules of boolean algebra.

It generates truth tables showing every input/output combination, identifies minterms and maxterms, and applies minimization algorithms like Quine-McCluskey to find the simplest equivalent expression.

### Boolean Operators and Notation

This calculator accepts **multiple notation styles**:

- AND (*, ·, AND, &&)
- OR (+, OR, ||)
- NOT (', !, ~, NOT)
- XOR (^, XOR)
- NAND
- NOR
- XNOR

Variables are single letters A through D. Parentheses are supported for grouping.

Examples: A*B+C', (A OR B) AND NOT C, A NAND B.

### How to Simplify a Boolean Expression Step by Step

To simplify a boolean expression, apply the algebraic laws that govern binary logic until no further reduction is possible.

Start with the **identity and complement laws** (A + A' = 1, A · A' = 0), then use absorption (A + A·B = A) and distribution to factor common variables. De Morgan's theorems convert complemented groups, and the consensus theorem removes redundant terms. For a systematic result, list minterms and combine those differing by one bit.

As George Boole introduced in his 1854 work, per Encyclopaedia Britannica, these laws form a closed algebra where every expression can be reduced to a minimal form (not always unique). This calculator shows each rule applied in order.

### How to Read and Build a Truth Table for Any Logic Function

A **truth table** lists every possible combination of input variables and the resulting output, giving a complete definition of a boolean function.

For n variables there are 2^n rows, so two variables produce 4 rows and four variables produce 16 rows; conversely, the number of variables equals the base-2 logarithm of the row count, which our logarithm calculator can evaluate for larger functions. Order the inputs in standard binary counting sequence (00, 01, 10, 11) and evaluate the expression for each row.

According to the IEEE standard for logic operations, the output column fully characterizes the function regardless of how the expression is written. This tool auto-generates the truth table, then derives minterms (rows equal to 1) and maxterms (rows equal to 0) directly from it.

### SOP vs POS: Sum of Products and Product of Sums Explained

**Sum of Products (SOP)** expresses a boolean function as an OR of AND terms, one minterm for each row where the output equals 1. **Product of Sums (POS)** is the dual: an AND of OR terms, one maxterm for each row where the output equals 0.

Both are canonical forms describing the same function, and either can be minimized. Digital design textbooks such as those referenced by All About Circuits note that SOP maps naturally to two-level AND-OR gate networks, while POS maps to OR-AND networks.

Choose whichever yields fewer gates for your circuit. The calculator outputs both canonical forms plus the minimized SOP for comparison.

### How Karnaugh Maps Simplify Boolean Logic Visually

A **Karnaugh map** is a grid that arranges truth-table outputs so that physically adjacent cells differ by exactly one variable, using Gray-code ordering (00, 01, 11, 10).

This adjacency lets you visually group 1s in rectangular blocks of powers of two (1, 2, 4, 8) to eliminate variables and read off a minimal SOP.

Named after Maurice Karnaugh, who published the technique in 1953, K-maps are practical for up to four or five variables before adjacency becomes hard to track. This calculator renders a color-coded map highlighting each minterm so you can confirm the algorithmic result by eye.

### How the Quine-McCluskey Algorithm Finds the Minimal Expression

The **Quine-McCluskey method** is a tabular procedure that guarantees a minimal Sum of Products, making it more reliable than Karnaugh maps for functions with many variables.

It lists every minterm in binary, groups them by the number of 1-bits, then repeatedly combines terms that differ by a single bit, marking the eliminated position with a dash. Terms that cannot combine further are prime implicants. A prime implicant chart then selects the smallest set of essential prime implicants covering all minterms.

Because it is algorithmic, it scales where visual methods fail, which is why it underpins many automated logic-synthesis tools used in modern EDA workflows.

### Understanding De Morgan's Theorems and Universal Gates

**De Morgan's theorems** state that (A·B)' = A' + B' and (A+B)' = A'·B' — complementing a group flips the operator and inverts each variable. These laws are the basis for converting any circuit into NAND-only or NOR-only form.

NAND and NOR are called **universal gates** because any boolean function can be built entirely from either one, a property widely used in chip fabrication to reduce the number of transistor types. As standard digital-logic references note, this universality simplifies manufacturing and testing.

The calculator applies De Morgan's laws automatically when you enter NAND, NOR, or XNOR operators, showing the equivalent AND/OR/NOT expansion.

### Practical Uses of Boolean Algebra in Engineering and Programming

**Boolean algebra is used far beyond textbooks.** Hardware engineers apply it to minimize gate counts in combinational logic for CPUs, FPGAs, and ASICs, directly cutting power draw and chip area.

Software developers use the same laws to simplify conditional statements, optimize compiler branch logic, and write clearer if-conditions. Database engineers translate query filters into boolean predicates, and search engines evaluate AND/OR/NOT operators the same way.

According to computer-science curricula summarized by Khan Academy, boolean logic is foundational to how all digital information is processed. This calculator supports up to four variables, covering the vast majority of combinational-logic exam problems and everyday simplification tasks.

### Common Mistakes When Simplifying Boolean Expressions

Simplifying boolean expressions invites several **common errors**:

- The most frequent error is confusing OR (+) with arithmetic addition — in boolean algebra 1 + 1 = 1, not 2.
- Another is dropping parentheses, which changes operator precedence and produces a different function; NOT binds tightest, then AND, then OR.
- Students often stop simplifying too early, missing a consensus term or an absorption that removes a whole variable, or too late, over-factoring into a longer expression.
- Misordering Karnaugh-map columns (using binary 00, 01, 10, 11 instead of Gray code 00, 01, 11, 10) breaks adjacency and yields wrong groupings.

Always verify the simplified result against the original truth table, which this calculator does automatically to catch these mistakes.

### Boolean Operator Precedence and Order of Evaluation

When an expression mixes operators without full parentheses, boolean algebra evaluates **NOT first, then AND, then OR**, mirroring how multiplication precedes addition in ordinary arithmetic.

So A + B·C means A OR (B AND C), and A·B' means A AND (NOT B), not (A AND B)'. XOR is typically treated at the same level as AND or lower, so parentheses are recommended whenever XOR is combined with other operators to avoid ambiguity.

This precedence follows the conventions used across digital-logic references and IEEE notation. To stay safe, wrap any sub-expression whose grouping you care about in parentheses; the calculator respects explicit parentheses over default precedence every time.

## Related Calculators

- [matrix-calculator](https://calculators.im/matrix-calculator)
- [complex-number-calculator](https://calculators.im/complex-number-calculator)
- [scientific-calculator](https://calculators.im/scientific-calculator)
- [derivative-calculator](https://calculators.im/derivative-calculator)
- [standard-deviation-calculator](https://calculators.im/standard-deviation-calculator)

## Authoritative Sources

- [Encyclopaedia Britannica - Boolean Algebra](https://www.britannica.com/topic/Boolean-algebra) — History and foundations of boolean algebra from George Boole
- [All About Circuits - Karnaugh Mapping](https://www.allaboutcircuits.com/textbook/digital/chpt-8/karnaugh-maps-truth-tables-boolean-expressions/) — Karnaugh map method for Boolean simplification
- [Khan Academy - Digital Information and Logic](https://www.khanacademy.org/computing/computers-and-the-internet/xcae6f4a7ff015e7d:digital-information) — Introduction to boolean logic and how digital information is processed
- [All About Circuits - Boolean Algebra](https://www.allaboutcircuits.com/textbook/digital/chpt-7/boolean-algebra/) — Complete guide to boolean algebra, SOP/POS forms, and simplification
- [IEEE Standards - Graphic Symbols for Logic Functions (IEEE 91)](https://standards.ieee.org/ieee/91_91a/241/) — Standard notation and symbols for logic operations and gates

---

*Source: https://calculators.im/boolean-algebra-calculator — calculators.im, 299+ free online calculators.*
