A prime implicant of a Boolean function is an implicant of that cannot be enlarged. Removing any literal from it would either make it not an implicant any more (it would cover a of ) or — equivalently on a Karnaugh Map — it would no longer be a rectangle of s.

A prime implicant is the maximal rectangle of s on the K-map. There’s no bigger group it fits inside.

Why only primes matter

Any minimum-cost SOP for uses only prime implicants. The argument: if a non-prime implicant is in the cover, can be enlarged to some prime by dropping a literal. has fewer literals than and covers a superset of ‘s 1-cells, so swapping for never increases the cost and may shrink it. Repeat until every term is prime.

So the search for a minimum SOP can be restricted to prime implicants without losing optimality. This is the foundational reduction that makes K-map minimisation manageable.

Identifying primes on a K-map

Walk every on the map. For each, find the largest rectangle of s (in powers of two, possibly wrapping around the toroidal edges) that contains it. That rectangle is a prime implicant. Distinct s may produce the same prime — so the set of primes is found by unioning all maximal rectangles.

Primes can overlap. A single can be inside more than one prime — that’s how you get non-essential primes.

Worked example

Consider the function with 1-cells at minterms on a 4-variable K-map (variables ).

Maximal rectangles (each is a prime implicant):

  • — a block. Variables that stay constant: . Prime: .
  • — a block. Variables constant: . Prime: .
  • — a column. Variables constant: . Prime: .
  • — an adjacent pair. Variables constant: . Prime: .

Each is maximal — none can be doubled while staying inside the -set. So these four are the prime implicants.

A non-prime implicant like — variables constant , term — is not prime because it sits inside the larger , which drops to give . The bigger one wins.

Quine-McCluskey

For more than 4 variables, K-maps stop being practical. The Quine-McCluskey algorithm finds prime implicants tabularly: list all minterms in binary, group by number of s, repeatedly merge pairs that differ in exactly one bit (replacing the differing bit with ), and keep going until no more merges are possible. Anything that can’t be merged further is prime.

Quine-McCluskey is exact but exponential; for many variables, heuristic minimisers like Espresso are used in practice.

What primes don’t tell you

Knowing the prime implicants doesn’t immediately give the minimum cover — you still have to choose which primes to include. That’s the role of essential prime implicants (mandatory) and the cover-selection step that picks among the rest.

Two examples of why the choice matters:

  • A function might have many primes but only a few essentials, with the remainder optional. The minimum cover uses essentials plus the cheapest selection of non-essentials that covers anything left.
  • Two different sets of primes can both produce minimum covers — minimisation is not always uniquely solvable.

In context

Prime implicants live in the K-map workflow described at Karnaugh Map and in the tabular workflow of Quine-McCluskey. See Implicant for the broader concept and Essential prime implicant for the next refinement.