Quine-McCluskey Two-Level Minimization
The idea
Any Boolean function can be written as a sum of products: an OR of AND terms, which is a two-level circuit. The smallest such form uses the fewest product terms, each as large as possible. Quine (1952) and McCluskey (1956) split the search into two phases.
Find every prime implicant. Start from the minterms, the input combinations for which the function is 1. Group them by how many ones they contain, and merge any two terms that differ in exactly one bit; that bit becomes a don't-care. Repeat on the merged terms until nothing merges. A term that never merged into a larger one is a prime implicant: it cannot grow without covering an input where the function is 0.
Choose a cover. Build a table with one row per prime and one column per minterm. A prime that is the only one covering some minterm is essential and is taken first. What remains is a set-covering problem: pick the fewest primes whose rows cover every remaining column, solved exactly for small functions by branching over the choices.
Watch it work: a four-input function
Ten minterms on a Karnaugh map, the grid view of a four-input function in which neighbouring cells differ in one input. The walkthrough runs both phases: two merging passes that find six prime implicants, then the prime chart, the two essential primes, and the last choice that completes the cover.
The fine print
Both phases blow up. The number of prime implicants can grow exponentially with the number of inputs, on the order of 3ⁿ ÷ n in the worst case, and set covering is NP-hard (Non-deterministic Polynomial-time hard). Exact minimization is practical only for small functions. The heuristic successor, Espresso (Brayton, Hachtel, McMullen and Sangiovanni-Vincentelli, 1984), never lists all the primes: it repeatedly expands, reduces and removes redundant terms from a cover, and reaches near-minimum results on functions with dozens of inputs.
Where you meet it today
Two-level forms still describe programmable logic arrays and the local function of each node inside a multilevel network, and minimizers descended from Espresso still simplify those local functions.