Karnaugh map

Input mode
Variable order (most significant first)
Click a cell, or focus it and press Space to cycle 0 → 1 → x. Keys 0, 1 and x set a value directly; arrow keys move between cells and PageUp/PageDown change plane.

single plane

A down the rows, BC across the columns. Adjacent cells differ in one variable, including the first and last row/column. Minterm indices are printed in each cell.
A \ BCB=0, C=0B=0, C=1B=1, C=1B=1, C=0
A=0
A=1
B & C!A & !B

Canonical & minimized forms

8 of 8 cells are constrained; 0 are don’t cares.

Canonical sum of products (Σm) fixed 1s

Σm(0, 1, 3, 7)

!A & !B & !C | !A & !B & C | !A & B & C | A & B & C

Canonical Σm uses the completion that assigns every don’t care the value 0, so it lists exactly the fixed-1 minterms.

Canonical product of sums (ΠM) fixed 0s

ΠM(2, 4, 5, 6)

(A | !B | C) & (!A | B | C) & (!A | B | !C) & (!A | !B | C)

Canonical ΠM uses the complementary completion that assigns every don’t care the value 1, so it lists exactly the fixed-0 maxterms.

Don’t-care minterm indices

none

Don’t cares are free to be grouped with either value, so they appear in no canonical family. Each canonical form above names the completion it represents.

Minimized sum of products minimum found

B & C | !A & !B

2 terms, 2 literals. Objective: Fewest terms first, then fewest literals, then the lexicographically smallest sorted term list. This minimum is unique in term and literal counts.

Minimized product of sums minimum found

(!B | C) & (!A | B)

2 terms, 2 literals. Objective: Fewest terms first, then fewest literals, then the lexicographically smallest sorted term list. This minimum is unique in term and literal counts.

Grouping workings

Verification

Every reported expression was evaluated on all 8 assignments and compared with the map’s 8 constrained cells (don’t cares never force a value). All four outputs agree everywhere they are constrained.

Cross-check of each output against the constrained cells
OutputResultFirst disagreement
Canonical sum of productsmatches every constrained cell—
Canonical product of sumsmatches every constrained cell—
Minimized sum of productsmatches every constrained cell—
Minimized product of sumsmatches every constrained cell—

Help & limits

  • Reading the map. Rows and columns are labelled in Gray code, so neighbours differ in one variable. Every cell prints its minterm index. The edges wrap: the first and last row are neighbours, and so are the first and last column.
  • Five and six variables. The map is drawn as 2 or 4 labelled four-variable planes. Planes whose fixed variables differ in one bit are adjacent, so a group may span planes; that is why a six-variable quad can drop C, D, E and F at once.
  • Decimal neighbours. Consecutive decimal indices are not always adjacent on the map (m7 and m8 differ in three variables) — only one-bit differences count.
  • Cell values. Cycle 0 → 1 → x → 0 with a click or Space on a focused cell; press 0, 1 or x to set a value directly.
  • Canonical forms. Canonical Σm lists the fixed-1 minterms and canonical ΠM the fixed-0 maxterms. With don’t cares, Σm uses the completion that reads every x as 0 and ΠM the one that reads every x as 1; both labels state this.
  • Minimization objective. Fewest terms first, then fewest literals, then the lexicographically smallest sorted term list. Prime implicants come from Quine–McCluskey over the ones plus don’t cares (SOP) or the zeros plus don’t cares (POS), and the cover search is exact.
  • Honest limits. If the cover search exhausts its 40,000-node budget the result is reported as valid but not proven minimum; a partial heuristic result is never labelled minimum.
  • All don’t care (convention). When every cell is x the map has no fixed cell, so it is read as the constant 0 by convention and the map states that it applied the convention.
  • Empty on/off sets. With no fixed 1 the minimized SOP is the constant 0; with no fixed 0 the minimized POS is the constant 0 too, because no assignment satisfies the function.
  • Overlapping groups and ties. A cell may belong to several groups; its badge lists them. When several covers share the same term and literal counts, the tool reports how many exist and shows up to 3 alternatives.
  • Limits. At most 6 variables (64 cells), variable names up to 3 characters and formulas up to 2000 characters.

Canonical SOP lists exactly the fixed-1 minterms (Σm); canonical POS lists exactly the fixed-0 maxterms (ΠM). With don’t cares present, canonical Σm uses the all-0 completion (every x read as 0) and canonical ΠM uses the all-1 completion (every x read as 1). Minimized forms respect every constrained cell; a don’t care may be grouped to any value that shortens the expression.