Home › Developer Tools › Boolean Algebra Simplifier

Boolean Algebra Simplifier

Enter a boolean expression like A'B + AB + AB'C, or a list of minterms with optional don't-cares. The simplifier finds the minimal sum of products and product of sums with the Quine-McCluskey method and shows every step.

Last updated:

Input type

' or ! or ~ or NOT = NOT, juxtaposition · * & AND = AND, + | OR = OR, ^ XOR, -> implies. Brackets allowed.

Ranges allowed: 0-3, 7

Enter your values to see the result.
Advertisement
Advertisement

How to use the Boolean Algebra Simplifier

  1. Pick the input type: a boolean expression, or a minterm list with variable names.
  2. Type the expression, e.g. A'B + AB + AB'C (' means NOT, juxtaposition means AND, + means OR), or the minterm numbers such as 0, 2, 5-7.
  3. Add don't-cares if some input combinations can never happen.
  4. Press Simplify to get the minimal SOP and POS with their term and literal counts.
  5. Follow the steps and the prime implicant chart to see why the answer is minimal, then copy it.

Boolean algebra laws used in simplification

LawAND formOR form
IdentityA · 1 = AA + 0 = A
Null (annulment)A · 0 = 0A + 1 = 1
IdempotentA · A = AA + A = A
ComplementA · A' = 0A + A' = 1
Double negation(A')' = A
AbsorptionA(A + B) = AA + AB = A
Combining (adjacency)(A + B)(A + B') = AAB + AB' = A
Redundant literalA(A' + B) = ABA + A'B = A + B
DistributiveA(B + C) = AB + ACA + BC = (A + B)(A + C)
De Morgan(AB)' = A' + B'(A + B)' = A'B'
Consensus(A + B)(A' + C)(B + C) = (A + B)(A' + C)AB + A'C + BC = AB + A'C

Worked example: A'B + AB + AB'C

  1. The expression is 1 for minterms 2, 3, 5, 6 and 7 (binary 010, 011, 101, 110, 111).
  2. Combining neighbours gives 01- (A'B), -1- after a second round (B), and 1-1 (AC).
  3. The prime implicants are B (covers 2, 3, 6, 7) and AC (covers 5, 7). Both are essential: only B covers 2 and only AC covers 5.
  4. Minimal SOP: F = B + AC, down from 7 literals to 3. The minimal POS is (A + B)(B + C).

The same answer follows algebraically: A'B + AB = B (combining), and B + AB'C = B + AC (redundant literal, because B + B'(AC) = B + AC).

Tips

  • Write products without a symbol. With single-letter variables on, AB'C means A AND NOT B AND C. Turn it off for multi-letter names such as start AND NOT stop.
  • Compare SOP and POS. If the function has many 1s, the POS (built from the 0s) is often the shorter one.
  • XOR does not shrink. Parity functions like A ⊕ B ⊕ C have no adjacent minterms, so their two-level form stays large; keep them as XOR gates.
  • Need the full table? The Truth Table Generator shows every row, minterms and the canonical DNF/CNF of any expression.

Frequently asked questions

How do I simplify a boolean expression?

By hand you apply laws such as absorption (A + AB = A), combining (AB + AB' = A) and consensus (AB + A'C + BC = AB + A'C), or you draw a Karnaugh map. Those approaches depend on spotting the right move. The Quine-McCluskey method used here is systematic: it lists all prime implicants and then picks the smallest set that covers every minterm, so the result is guaranteed minimal.

What is the Quine-McCluskey method?

It is a tabular algorithm for two-level logic minimisation. Minterms are grouped by their number of 1 bits, and terms in neighbouring groups that differ in exactly one bit are merged, replacing that bit with a dash. Terms that cannot merge any further are prime implicants. A prime implicant chart then selects the essential primes and the cheapest cover for the remaining minterms.

What is the difference between SOP and POS?

Sum of products (SOP) is an OR of AND terms, such as AB' + C, and maps directly to AND-OR or NAND-NAND logic. Product of sums (POS) is an AND of OR clauses, such as (A + C)(B' + C), and maps to OR-AND or NOR-NOR logic. The minimal POS is found by minimising the zeros of the function and applying De Morgan's law, and it can be smaller or larger than the minimal SOP.

What are don't-care terms?

Don't-cares are input combinations that never occur or whose output does not matter, written d(…) or X. For example, BCD digits only use 0 to 9, so inputs 10 to 15 of a 4-bit decoder are don't-cares. The simplifier may treat each one as 0 or 1, whichever gives a smaller answer, which often removes whole terms.

Why can there be more than one minimal answer?

Some functions have several covers with the same number of terms and literals. A classic example is Σm(0, 1, 2, 5, 6, 7), which is both A'B' + BC' + AC and A'C' + B'C + AB. The tool lists the alternatives it finds so you can pick the one that shares gates with the rest of your circuit.

How is the minterm number related to the variables?

Variables are taken in the order shown (alphabetical for expressions), and the first one is the most significant bit. With A, B, C, D the minterm 11 is binary 1011, i.e. A = 1, B = 0, C = 1, D = 1, which is the product AB'CD.

Is this the same as a Karnaugh map?

It gives the same minimal answer as a correctly drawn Karnaugh map, but it works for more than four variables and does not depend on spotting the right groups. The prime implicants correspond to the largest possible K-map groups and the essential ones are the groups that cover a cell no other group covers.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.Binary CalculatorAdd, subtract, multiply, divide, AND, OR, XOR and shift binary numbers with decimal values.Bitwise CalculatorCalculate AND, OR, XOR, NOT and bit shifts at 8–64 bits with a bit grid and all bases.Number Base ConverterConvert numbers between any bases from 2 to 36, with fractions and steps.JSON to Excel ConverterTurn JSON into a styled .xlsx spreadsheet; nested arrays become their own linked sheets.JSON to CSVConvert JSON data to CSV for spreadsheets.CSV to JSONConvert CSV data to JSON with live preview.Excel to CSVConvert XLSX spreadsheets to CSV.CSV ViewerOpen a CSV or TSV file as a sortable, filterable table.Excel Viewer (XLSX / XLS)Open XLSX, XLS and ODS spreadsheets in your browser without Excel.Line Ending ConverterConvert text and files between CRLF, LF and CR line endings.Markdown to HTMLConvert Markdown to clean HTML with a live editor.XML to JSONConvert XML to JSON with validation.Text Encoding ConverterDetect and convert text file encodings like UTF-8, UTF-16 and Latin-1.JSON ViewerExplore JSON as a collapsible tree, search keys and values and copy any node's path.TTF to WOFF2 ConverterConvert TTF and OTF fonts to WOFF2 or WOFF and get a ready @font-face CSS snippet.Chmod CalculatorConvert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation.JSON to TypeScriptGenerate TypeScript interfaces or types from JSON, with nested types and optional fields.Morse Code TranslatorTranslate text to Morse code and back, then play it as sound or a blinking light, or save a WAV.HTML Table GeneratorBuild HTML tables in an editable grid with styles, header rows, CSV import and live preview.Hex to Text ConverterConvert hex to text and text to hex with UTF-8 support and space, 0x, \x or comma formats.JSON to XML ConverterConvert JSON to well-formed XML with attributes, arrays and pretty print.JSON to YAML ConverterConvert JSON to clean YAML as you type, with indent, quoting and sort options.YAML to JSON ConverterConvert YAML to pretty or minified JSON, with errors pinned to the exact line.HTML to Markdown ConverterTurn HTML or pasted rich text into clean Markdown with tables and live preview.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.JSON ValidatorCheck JSON with the exact line and column of each error, fix tips and one-click auto-fix.Image to Base64Convert images to Base64 data URIs, CSS backgrounds and HTML img tags in your browser.Base64 to ImagePaste a Base64 string or data URI to preview, identify and download the image.JSON CompareCompare two JSON documents and see every added, removed and changed path.Hex to DecimalConvert hex to decimal instantly with steps and signed mode.Decimal to HexConvert decimal to hex instantly with steps and signed mode.Binary to DecimalConvert binary to decimal instantly with steps and signed mode.Decimal to BinaryConvert decimal to binary instantly with steps and signed mode.Two's Complement CalculatorDecimal to two's complement binary and back for 4-64 bits, with invert-and-add-1 steps.XML to CSV ConverterConvert XML to CSV: detects repeating records, flattens nested data, pick your columns.CSV to XML ConverterConvert CSV to well-formed XML with custom root and row names, escaping and pretty print.TOML to JSON ConverterConvert TOML to JSON and JSON to TOML with a full v1.0 parser and clear error lines.SQL to JSON ConverterConvert SQL INSERT statements and dumps into a JSON array of row objects, with CSV export.TSV to CSV ConverterConvert TSV to CSV and back, or between tab, comma, semicolon and pipe, with correct quoting.TypeScript to JavaScriptConvert TypeScript or TSX to clean JavaScript instantly: strip types, keep or compile JSX.XML to YAML ConverterConvert XML to clean YAML with attributes, text nodes, lists and exact error lines.YAML to XML ConverterConvert YAML to pretty, well-formed XML with custom root, attributes and array item tags.Compare Excel FilesCompare two Excel spreadsheets cell by cell, highlight changes and export a diff report.CSV CleanerClean messy CSV in one click: trim spaces, drop empty rows and columns, fix headers, dedupe.CSV VLOOKUP ToolJoin two CSV or Excel files on a key column like VLOOKUP, with left, inner and full joins.Remove Duplicates in ExcelFind and remove or highlight duplicate rows in XLSX or CSV files by the columns you choose.GeoJSON ViewerView GeoJSON on a map, inspect and edit properties, validate against RFC 7946 and export.GPX ViewerOpen GPX tracks on a map with distance, elevation profile, moving time, speed and splits.JSON Repair ToolFix broken JSON automatically: trailing commas, quotes, comments, truncated data, with a diff.Karnaugh Map SolverSolve 2–6 variable K-maps: click cells or enter minterms to get the minimal SOP or POS with groups.Merge Excel FilesCombine XLSX, XLS and CSV files into one workbook or append all rows into a single sheet.Parquet File ViewerOpen Apache Parquet files in your browser: schema, rows, filters and CSV or JSON export.Query CSV with SQLRun SQL on CSV, Excel, JSON and Parquet files in your browser with DuckDB. Join and export.Online Serial MonitorTalk to Arduino, ESP32 and USB serial devices in your browser: log, send, plot and save.Split Excel FileSplit an Excel sheet into several files by row count or by each value in a column, as ZIP.SQL Create Table GeneratorDefine columns, keys, defaults and indexes; get CREATE TABLE SQL for MySQL, Postgres and more.SQL IN Clause GeneratorTurn a pasted list into a SQL IN ('a','b') clause with quoting, dedupe and 1,000-item chunks.SQL Online CompilerRun SQL queries online on SQLite with sample databases, a result grid, CSV export and .db save.SQL to ER DiagramPaste CREATE TABLE statements and get an entity-relationship diagram with keys and links.XML to XSD GeneratorGenerate an XML Schema (XSD) from sample XML: types, occurrences, attributes and namespaces.XML ValidatorCheck if XML is well-formed, see the exact line and column of each error and pretty-print it.Wildcard Mask CalculatorConvert a subnet mask or CIDR to a wildcard mask for ACLs and OSPF, with range and binary.CSV to VCF ConverterConvert a contacts CSV into a vCard (.vcf) file, mapping columns to name, phone, email and more.CSV to YAML ConverterConvert CSV rows to a YAML list of mappings with type inference and delimiter detection.Endianness ConverterSwap byte order of 16, 32 and 64-bit hex values and see big- and little-endian integers and floats.Excel to SQL ConverterTurn an Excel sheet into CREATE TABLE and INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server.Excel to VCF ConverterTurn an Excel contact list into a vCard .vcf file for iPhone, Android, Google or Outlook.
See all 129 Data & File Format Converters →