Skip to content
KmapGen

6-Variable K-Map Solver

Solve a 6-variable Karnaugh map: four 4×4 maps for AB = 00, 01, 11, 10, with groups drawn across maps and every minimal SOP and POS.

Variables
6-variable Karnaugh map (click cells to edit)AB = 00CDEF000111100001111010010302140507061120130150141809011010AB = 01CDEF0001111000011110016017019118020121123022028129131030024025027026AB = 10CDEF0001111000011110132033035034136037039038144045047046140041043042AB = 11CDEF0001111000011110048049051050052153155054060161163062056057059058

Click or tap a cell to change it. Keyboard: Tab to the map, arrows move, Enter or Space cycles, 0 / 1 / X set the value. Small numbers are minterm numbers.

Minimal SOP (sum of products)

F = A'BC'D'EF' + BDF + B'E'F'

3 product terms, 12 literals
Unique minimal answer.

Minimal POS (product of sums)

F = (A' + D + E')(B + E')(B + F')(B' + E + F)(C' + D + E')(D + F')(D' + E' + F)

7 sum terms, 18 literals
32+ equally minimal answers:

Step-by-step solution

1. Groups on the map (SOP)

The 1s are covered by 3 groups. In each product term, a variable that stays 1 across the group appears as is and one that stays 0 appears complemented. Hover or tap a term to highlight its group.

  • A'BC'D'EF' group of 1 · cells 18 · pattern 010010 essential

    A = 0, B = 1, C = 0, D = 0, E = 1, F = 0 in every cell; no variable drops out. It is essential: m18 is covered by no other prime implicant.

  • BDF group of 8 · cells 21, 23, 29, 31, 53, 55, 61, 63 · pattern –1–1–1 essential wraps 2 sub-maps

    B = 1, D = 1, F = 1 in every cell; A, C, E change inside the group and drop out. It is essential: m21, m23, m29, m31, m53, m55, m61, m63 are covered by no other prime implicant.

  • B'E'F' group of 8 · cells 0, 4, 8, 12, 32, 36, 40, 44 · pattern –0––00 essential wraps 2 sub-maps

    B = 0, E = 0, F = 0 in every cell; A, C, D change inside the group and drop out. It is essential: m0, m4, m8, m12, m32, m36, m40, m44 are covered by no other prime implicant.

2. Prime implicants and essential primes

Each row is a prime implicant (a group that cannot be made larger). A ⊗ marks a minterm covered by a single prime: that prime is essential (*) and must be in every minimal answer.

PrimeTermPatternm0m4m8m12m18m21m23m29m31m32m36m40m44m53m55m61m63
P1 *B'E'F'–0––00⊗⊗⊗⊗⊗⊗⊗⊗
P2 *BDF–1–1–1⊗⊗⊗⊗⊗⊗⊗⊗
P3 *A'BC'D'EF'010010⊗

Essential: P1, P2, P3. The essential primes cover everything.

3. Petrick's method: choosing the cheapest cover

Not needed: the essential prime implicants already cover every required cell, so the answer is unique.

4. Quine–McCluskey tabulation

Cells are sorted by their number of 1 bits. Two entries in neighboring groups combine when their patterns differ in exactly one position (that position becomes –). ✓ = combined further; PI = could not be combined, so it is a prime implicant.

Groups of 1

1sCellsPattern
00000000✓
14000100✓
8001000✓
32100000✓
212001100✓
18010010PI
36100100✓
40101000✓
321010101✓
44101100✓
423010111✓
29011101✓
53110101✓
531011111✓
55110111✓
61111101✓
663111111✓

Groups of 2

1sCellsPattern
00,4000–00✓
0,800–000✓
0,32–00000✓
14,1200–100✓
4,36–00100✓
8,12001–00✓
8,40–01000✓
32,36100–00✓
32,4010–000✓
212,44–01100✓
36,4410–100✓
40,44101–00✓
321,230101–1✓
21,2901–101✓
21,53–10101✓
423,3101–111✓
23,55–10111✓
29,310111–1✓
29,61–11101✓
53,551101–1✓
53,6111–101✓
531,63–11111✓
55,6311–111✓
61,631111–1✓

Groups of 4

1sCellsPattern
00,4,8,1200––00✓
0,4,32,36–00–00✓
0,8,32,40–0–000✓
14,12,36,44–0–100✓
8,12,40,44–01–00✓
32,36,40,4410––00✓
321,23,29,3101–1–1✓
21,23,53,55–101–1✓
21,29,53,61–1–101✓
423,31,55,63–1–111✓
29,31,61,63–111–1✓
53,55,61,6311–1–1✓

Groups of 8

1sCellsPattern
00,4,8,12,32,36,40,44–0––00PI
321,23,29,31,53,55,61,63–1–1–1PI
5. Truth table, Σm, ΠM and canonical forms
#ABCDEFF
00000001
10000010
20000100
30000110
40001001
50001010
60001100
70001110
80010001
90010010
100010100
110010110
120011001
130011010
140011100
150011110
160100000
170100010
180100101
190100110
200101000
210101011
220101100
230101111
240110000
250110010
260110100
270110110
280111000
290111011
300111100
310111111
321000001
331000010
341000100
351000110
361001001
371001010
381001100
391001110
401010001
411010010
421010100
431010110
441011001
451011010
461011100
471011110
481100000
491100010
501100100
511100110
521101000
531101011
541101100
551101111
561110000
571110010
581110100
591110110
601111000
611111011
621111100
631111111

Minterm list: F = Σm(0, 4, 8, 12, 18, 21, 23, 29, 31, 32, 36, 40, 44, 53, 55, 61, 63)

Maxterm list: F = ΠM(1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 22, 24, 25, 26, 27, 28, 30, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 54, 56, 57, 58, 59, 60, 62)

Canonical SOP (one term per 1): A'B'C'D'E'F' + A'B'C'DE'F' + A'B'CD'E'F' + A'B'CDE'F' + A'BC'D'EF' + A'BC'DE'F + A'BC'DEF + A'BCDE'F + A'BCDEF + AB'C'D'E'F' + AB'C'DE'F' + AB'CD'E'F' + AB'CDE'F' + ABC'DE'F + ABC'DEF + ABCDE'F + ABCDEF

Canonical POS (one clause per 0): (A + B + C + D + E + F')(A + B + C + D + E' + F)(A + B + C + D + E' + F')(A + B + C + D' + E + F')(A + B + C + D' + E' + F)(A + B + C + D' + E' + F')(A + B + C' + D + E + F')(A + B + C' + D + E' + F)(A + B + C' + D + E' + F')(A + B + C' + D' + E + F')(A + B + C' + D' + E' + F)(A + B + C' + D' + E' + F')(A + B' + C + D + E + F)(A + B' + C + D + E + F')(A + B' + C + D + E' + F')(A + B' + C + D' + E + F)(A + B' + C + D' + E' + F)(A + B' + C' + D + E + F)(A + B' + C' + D + E + F')(A + B' + C' + D + E' + F)(A + B' + C' + D + E' + F')(A + B' + C' + D' + E + F)(A + B' + C' + D' + E' + F)(A' + B + C + D + E + F')(A' + B + C + D + E' + F)(A' + B + C + D + E' + F')(A' + B + C + D' + E + F')(A' + B + C + D' + E' + F)(A' + B + C + D' + E' + F')(A' + B + C' + D + E + F')(A' + B + C' + D + E' + F)(A' + B + C' + D + E' + F')(A' + B + C' + D' + E + F')(A' + B + C' + D' + E' + F)(A' + B + C' + D' + E' + F')(A' + B' + C + D + E + F)(A' + B' + C + D + E + F')(A' + B' + C + D + E' + F)(A' + B' + C + D + E' + F')(A' + B' + C + D' + E + F)(A' + B' + C + D' + E' + F)(A' + B' + C' + D + E + F)(A' + B' + C' + D + E + F')(A' + B' + C' + D + E' + F)(A' + B' + C' + D + E' + F')(A' + B' + C' + D' + E + F)(A' + B' + C' + D' + E' + F)

Row number = minterm number, with A as the most significant bit.

6. Logic circuit (AND–OR)

Two-level AND–OR realization: one AND gate per term (a single-literal term is wired straight through), then one OR gate. 10 gates including inverters, 15 gate inputs. Replacing every AND and the final OR with NAND gates gives the equivalent NAND–NAND circuit with the same wiring (single-literal terms then need their complement).

AA′BB′CC′DD′EE′FF′F

Four maps and their adjacency

Each map is a 4-variable map of C, D, E and F. A and B pick the map, and the maps are arranged so that neighbors on the page are neighbors in the logic. On a phone the solver stacks them in the order 00, 01, 11, 10, where each map is adjacent to the next and the last to the first.

AB = 00: minterm numbers
CD \ EF 00011110
00 m0m1m3m2
01 m4m5m7m6
11 m12m13m15m14
10 m8m9m11m10
AB = 01: minterm numbers
CD \ EF 00011110
00 m16m17m19m18
01 m20m21m23m22
11 m28m29m31m30
10 m24m25m27m26
AB = 10: minterm numbers
CD \ EF 00011110
00 m32m33m35m34
01 m36m37m39m38
11 m44m45m47m46
10 m40m41m43m42
AB = 11: minterm numbers
CD \ EF 00011110
00 m48m49m51m50
01 m52m53m55m54
11 m60m61m63m62
10 m56m57m59m58

The minterm number of a cell is 32A + 16B + 8C + 4D + 2E + F, so the same position in the four maps holds m, m + 16, m + 32 and m + 48.

Grouping across maps

  • A group in one map keeps both A and B.
  • The same group in two adjacent maps (00 and 01, or 00 and 10, …) drops the variable that differs between them.
  • The same group in all four maps drops A and B.
  • Diagonal maps (00 and 11) are not adjacent: a pattern there is two separate groups.

Worked example

F = Σm(0, 1, 2, 3, 12, 13, 16, 17, 18, 19, 28, 29, 32, 33, 34, 35, 48, 49, 50, 51, 60, 61). The top row (CD = 00) is full in all four maps: that is one group of 16, C′D′. The pair m12, m13 (CD = 11, EF = 00 and 01) appears in maps 00 and 01, giving A′CDE′; the same pair appears in maps 01 and 11 (m28, m29 and m60, m61), giving BCDE′.

Solved 6-variable K-map for Σm(0, 1, 2, 3, 12, 13, 16, 17, 18, 19, 28, 29, 32, 33, 34, 35, 48, 49, 50, 51, 60, 61)AB = 00CDEF000111100001111010111312040507061121130150140809011010AB = 01CDEF0001111000011110116117119118020021023022128129031030024025027026AB = 10CDEF0001111000011110132133135134036037039038044045047046040041043042AB = 11CDEF0001111000011110148149151150052053055054160161063062056057059058
F = Σm(0, 1, 2, 3, 12, 13, 16, 17, 18, 19, 28, 29, 32, 33, 34, 35, 48, 49, 50, 51, 60, 61) → F = A'CDE' + BCDE' + C'D'
  1. A'CDE': group of 4 (m12, m13, m28, m29), wrapping 2 sub-maps, essential. A = 0, C = 1, D = 1, E = 0 in every cell; B, F change inside the group and drop out.
  2. BCDE': group of 4 (m28, m29, m60, m61), wrapping 2 sub-maps, essential. B = 1, C = 1, D = 1, E = 0 in every cell; A, F change inside the group and drop out.
  3. C'D': group of 16 (m0, m1, m2, m3, m16, m17, m18, m19, m32, m33, m34, m35, m48, m49, m50, m51), wrapping 4 sub-maps, essential. C = 0, D = 0 in every cell; A, B, E, F change inside the group and drop out.

Result: F = A'CDE' + BCDE' + C'D', 3 terms and 10 literals. Open this example in the solver.

Frequently asked questions

How is a 6-variable K-map arranged?

As four 4×4 maps selected by AB. They are placed in a 2×2 arrangement with AB = 00 top left, 01 top right, 10 bottom left and 11 bottom right, so that maps side by side or one above the other differ in one of A or B. Inside each map, CD labels the rows and EF the columns.

Which maps are adjacent in a 6-variable K-map?

Maps whose AB labels differ in one bit: 00–01, 00–10, 01–11 and 10–11. Maps 00 and 11 (diagonal) are not adjacent, and neither are 01 and 10. A group can span two adjacent maps (dropping A or B) or all four (dropping both).

Do people really solve 6-variable K-maps by hand?

In courses, yes, for practice with adjacency. In practice, 6 variables is about the limit of what a map shows clearly, and the Quine–McCluskey method or a program like this one is used beyond that. This solver uses Quine–McCluskey underneath and draws the result on the four maps.

What is the largest group in a 6-variable K-map?

64 cells (F = 1). A group of 32 leaves one literal, a group of 16 leaves two, and so on: every doubling removes one variable.