Boolean Algebra Simplifier
Given a Boolean expression — A·B + A·¬B + ¬A·B or a truth table with minterms — this simplifier returns the minimal sum-of-products form using the Quine-McCluskey algorithm, plus a Karnaugh map visualisation for up to six variables. It shows every step (prime implicants, essential prime implicants, the covering table) so it’s useful not just for homework but for auditing what a minimiser inside your synthesis tool chose.
How Boolean simplification runs
-
1
Enter the expression or minterms
Use operators · (AND), + (OR), ' or ¬ (NOT), ⊕ (XOR). Or paste minterm indices like m(0,1,3,7).
-
2
Truth table is generated
Every variable assignment is evaluated and the function output is tabulated.
-
3
Quine-McCluskey finds prime implicants
Minterms are grouped and combined iteratively. Adjacent groups (differing in one variable) merge until no more reductions are possible.
-
4
Essential implicants cover the function
A Petrick-method covering table picks the minimum set of prime implicants. The result is the simplified SOP. POS form is derived from the complement.
Operator notation supported
| Operation | Symbols accepted |
|---|---|
| AND | ·, *, &, ∧, space |
| OR | +, |, ∨ |
| NOT | ', ¬, !, ~, overbar (A with overbar renders as A') |
| XOR | ⊕, ^ |
| Constants | 0, 1 |
Example
Input: A·B + A·¬B + ¬A·B
Truth table:
| A | B | F |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Minterms: m(1, 2, 3). The minimal SOP reduces to A + B (OR of the two variables). The simplifier walks through:
- Group minterms by number of 1s
- Combine adjacent pairs: (1,3) →
-B, (2,3) →A- - Cover table shows both are essential — final form:
A + B
Why minimise
- Fewer gates: each AND/OR term costs silicon or FPGA LUTs.
- Shorter critical path: smaller logic usually means lower propagation delay.
- Lower power: fewer switching nodes.
Algorithm limits
- Number of variables: Quine-McCluskey scales as O(3^n / n) in the worst case. The tool handles up to 8 variables comfortably; beyond that, use Espresso-style heuristic minimisers (you will not get guaranteed minimality but it’s feasible).
- Don’t-care terms: include them with
d(indices)syntax to get smaller results when some input combinations cannot occur.
Frequently Asked Questions
Sum-of-products is OR-of-ANDs (like AB + CD); product-of-sums is AND-of-ORs (like (A+B)(C+D)). Same function, different structure. The simplifier returns both — pick whichever suits your downstream tool.
Yes. Enter them as d(index1, index2, ...) alongside the minterms. The minimiser treats them as “free” to assign whichever value gives a smaller result.
Both produce minimal cost if you pick correctly, but K-maps depend on the person spotting the largest possible groups. Quine-McCluskey is deterministic and always finds an optimum.
XOR is expanded into AND/OR/NOT before minimisation. You will get an equivalent SOP but the XOR structure is lost. For XOR-preserving optimisation, a different algorithm (Reed-Muller) is needed.
Related Tools
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
Random Color Palette Generator
Generate random color palettes from 2 to 15 swatches, choose a vibrant, pastel, muted or dark style, then copy HEX codes or CSS variables.
HEX Color Picker
Pick any colour visually and get its HEX, RGB, HSL, HSV and CMYK values, plus accessibility contrast against white and black.
JSON Formatter
Paste JSON to pretty-print with 2 or 4 spaces, minify it to compact output, or run a quick syntax check before copying the result.
BBCode to HTML Converter
Convert BBCode (bulletin-board markup) to clean HTML. Handles formatting tags, lists, quotes, code, images, links and tables.
Random Color Generator
Generate 1 to 50 random HEX colors with swatches you can preview, copy and use in CSS, design tests or palette exploration.