Enter a Boolean function below (as a truth table, as a function, or as a list of minterms) and the Quine-McCluskey algorithm reduces it to a minimal sum-of-products expression, with every merging round shown step by step. Tick "Allow XOR/XNOR minimization" to use an extension that additionally searches for exclusive-or groupings for possibly better simplifications.
Click an output cell to cycle it through 0, 1, and × (don't-care).
A minterm is just the row number of a truth table where the function is \(1\), so a list of minterms is the same information as the table above, written as row numbers.
Write a Boolean formula using the following notation:
- Values: up to 8 single-letter variables and the literals 0/1.
- Operators: & (AND), | (OR), ^ (XOR), and a leading ! or ~ for negation. Any bracket style can group expressions.
- Word forms: AND, OR, XOR, and NOT work in any case. The precedence is NOT, then AND, XOR, and OR.
- Multiplexer:
condition ? whenTrue : whenFalsehas the highest precedence, but each branch consumes a complete Boolean expression.
For example, a & !b | c^d and a AND NOT b OR c XOR d are equivalent. The expression f ? x | b : x & (~b) means f ? (x | b) : (x & (~b)).
Pressing "Minimize" evaluates the formula into the truth table above and then minimizes the result.
Try a worked example
Click any of these to load it into the solver above.