Karnaugh map
Input mode
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 \ BC | B=0, C=0 | B=0, C=1 | B=1, C=1 | B=1, C=0 |
|---|---|---|---|---|
| A=0 | ||||
| A=1 |
B & C!A & !BCanonical & minimized forms
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 product of sums (ΠM) fixed 0s
ΠM(2, 4, 5, 6)
(A | !B | C) & (!A | B | C) & (!A | B | !C) & (!A | !B | C)
Don’t-care minterm indices
none
Minimized sum of products minimum found
B & C | !A & !B
Minimized product of sums minimum found
(!B | C) & (!A | B)
Grouping workings
Verification
| Output | Result | First disagreement |
|---|---|---|
| Canonical sum of products | matches every constrained cell | — |
| Canonical product of sums | matches every constrained cell | — |
| Minimized sum of products | matches every constrained cell | — |
| Minimized product of sums | matches 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 → 0with a click or Space on a focused cell; press0,1orxto 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
xthe 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.