Boolean Expression Minimizer: Truth Table, Karnaugh Map, Quine-McCluskey

Reduce a truth table to the simplest AND-OR expression.

Use the tool

Why this tool exists

Enter the minterms (decimal numbers of the input combinations where the output is 1), optional don't-care terms and the number of variables (2 to 6). The tool finds the prime implicants with the Quine-McCluskey method, chooses an exact minimum cover (fewest terms, then fewest literals) with branch and bound and prints the expression with A as the most significant variable. A Karnaugh map in Gray-code order is shown for up to four variables. On 400 random four-variable functions the result matched an exhaustive search for the minimum number of terms every time, and every result was checked against the truth table.

Equivalent minimal forms may be written differently by other tools. Product-of-sums form is not produced.

No data is sent anywhere: the work happens in your browser, so you can use it offline once the page has loaded.

How to use it

  1. Enter the number of variables and the minterms.
  2. Add don't-care terms if any.
  3. Read the minimal expression and the map.
  4. Check it against your truth table.

Frequently asked questions

What are minterms?

Input combinations, counted as binary numbers, for which the function is 1.

What is a don't care?

An input that never occurs or whose output does not matter; it can be used to make groups larger.

Which variable is the most significant bit?

A. For four variables the minterm 5 is A'BC'D.

Is my data sent anywhere?

No. Everything is processed in your browser, and the page makes no network requests with your input.