Skip to content
K-Map Solver

6-Variable Karnaugh Map Solver

Sixty-four cells on four linked layers: the largest K-map you will meet in practice, solved exactly in your browser.

Try an example
Variables

Scroll sideways to see all layers.

AB = 00CDEF0001111000011110AB = 01CDEF0001111000011110AB = 10CDEF0001111000011110AB = 11CDEF0001111000011110

F = Σm(15, 22, 23, 29, 30, 31, 36, 37, 38, 39, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)

28 ones · 0 don't-cares · 36 zeros

0false1trueXdon't care (either)

Click a cell to cycle 0 → 1 → X, or hold the button and drag to paint. With the keyboard: arrow keys move, 0 1 X set a value, Space cycles, Page Up/Down switches layers, Ctrl+Z undoes.

Variable namesA B C D E F

1–3 characters, starting with a letter. Names must be different from each other.

Simplified K-map result

Updates as you edit. Hover a term or a card to see its group on the map.

AB = 00CDEF0001111000011110AB = 01CDEF0001111000011110AB = 10CDEF0001111000011110AB = 11CDEF0001111000011110

Simplified Boolean expression

F =CDEF+BDE+BCDF+AD+ACEF+ABE+ABCF

7 terms24 literals8 gates Checked against your function

Groups

  • CDEFEssential
    Minterms
    (15, 31, 47, 63)
    Original
    A'B'CDEF + A'BCDEF + AB'CDEF + ABCDEF
    Simplified
    CDEF
  • BDEEssential
    Minterms
    (22, 23, 30, 31, 54, 55, 62, 63)
    Original
    A'BC'DEF' + A'BC'DEF + A'BCDEF' + A'BCDEF + ABC'DEF' + ABC'DEF + ABCDEF' + ABCDEF
    Simplified
    BDE
  • BCDFEssential
    Minterms
    (29, 31, 61, 63)
    Original
    A'BCDE'F + A'BCDEF + ABCDE'F + ABCDEF
    Simplified
    BCDF
  • ADEssential
    Minterms
    (36, 37, 38, 39, 44, 45, 46, 47, 52, 53, 54, 55, 60, 61, 62, 63)
    Original
    Show all 16 terms
    AB'C'DE'F' + AB'C'DE'F + AB'C'DEF' + AB'C'DEF + AB'CDE'F' + AB'CDE'F + AB'CDEF' + AB'CDEF + ABC'DE'F' + ABC'DE'F + ABC'DEF' + ABC'DEF + ABCDE'F' + ABCDE'F + ABCDEF' + ABCDEF
    Simplified
    AD
  • ACEFEssential
    Minterms
    (43, 47, 59, 63)
    Original
    AB'CD'EF + AB'CDEF + ABCD'EF + ABCDEF
    Simplified
    ACEF
  • ABEEssential
    Minterms
    (50, 51, 54, 55, 58, 59, 62, 63)
    Original
    ABC'D'EF' + ABC'D'EF + ABC'DEF' + ABC'DEF + ABCD'EF' + ABCD'EF + ABCDEF' + ABCDEF
    Simplified
    ABE
  • ABCFEssential
    Minterms
    (57, 59, 61, 63)
    Original
    ABCD'E'F + ABCD'EF + ABCDE'F + ABCDEF
    Simplified
    ABCF

Truth table check

64 match0 mismatch

Every input row is evaluated against the simplified expression. A don't-care (X) row may give 0 or 1.

mABCDEFYour FResultStatus
000000000 Match
100000100 Match
200001000 Match
300001100 Match
400010000 Match
500010100 Match
600011000 Match
700011100 Match
800100000 Match
900100100 Match
1000101000 Match
1100101100 Match
1200110000 Match
1300110100 Match
1400111000 Match
1500111111 Match
1601000000 Match
1701000100 Match
1801001000 Match
1901001100 Match
2001010000 Match
2101010100 Match
2201011011 Match
2301011111 Match
2401100000 Match
2501100100 Match
2601101000 Match
2701101100 Match
2801110000 Match
2901110111 Match
3001111011 Match
3101111111 Match
3210000000 Match
3310000100 Match
3410001000 Match
3510001100 Match
3610010011 Match
3710010111 Match
3810011011 Match
3910011111 Match
4010100000 Match
4110100100 Match
4210101000 Match
4310101111 Match
4410110011 Match
4510110111 Match
4610111011 Match
4710111111 Match
4811000000 Match
4911000100 Match
5011001011 Match
5111001111 Match
5211010011 Match
5311010111 Match
5411011011 Match
5511011111 Match
5611100000 Match
5711100111 Match
5811101011 Match
5911101111 Match
6011110011 Match
6111110111 Match
6211111011 Match
6311111111 Match
Step-by-step: how the solver gets there (Quine–McCluskey)

Logic circuit

Fit
ABCDEFF
7 AND gates and 1 OR gate31 gate inputs2 levels Simulated circuit matches your function

Hover a gate to highlight its group · drag to pan · Ctrl/⌘ + scroll or the buttons to zoom.

Gate list
  • G1 = AND(C, D, E, F)
  • G2 = AND(B, D, E)
  • G3 = AND(B, C, D, F)
  • G4 = AND(A, D)
  • G5 = AND(A, C, E, F)
  • G6 = AND(A, B, E)
  • G7 = AND(A, B, C, F)
  • F = OR(G1, G2, G3, G4, G5, G6, G7)

Export & share

Files always use the light theme so they print cleanly.

Images
Expression as
Y = C D E F + B D E + B C D F + A D + A C E F + A B E + A B C F

Four layers in a square

A and B pick the layer, arranged as a 2×2 block in Gray order; C and D pick the row inside a layer and E and F the column. Layers next to each other in the block differ in a single variable, so matching cells are neighbours.

Groups can therefore have 1, 2, 4, 8, 16, 32 or 64 cells. The biggest ones usually sweep across several layers — look for the dotted links.

Minimal, not just plausible

Reading a 64-cell map by eye is error-prone. The solver enumerates every prime implicant and runs an exact search for the cheapest cover. If a pathological problem would take too long it stops and tells you the result may not be minimal.

Worked example: sum of products

The carry-out of adding two 3-bit numbers, ABC and DEF: it is 1 when the sum is 8 or more.

F = Σm(15, 22, 23, 29, 30, 31, 36, 37, 38, 39, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)

AB = 00CDEF0001111000011110AB = 01CDEF0001111000011110AB = 10CDEF0001111000011110AB = 11CDEF0001111000011110

Simplified result

F = CDEF + BDE + BCDF + AD + ACEF + ABE + ABCF

  • CDEF — minterms (15, 31, 47, 63)
  • BDE — minterms (22, 23, 30, 31, 54, 55, 62, 63)
  • BCDF — minterms (29, 31, 61, 63)
  • AD — minterms (36, 37, 38, 39, 44, 45, 46, 47, 52, 53, 54, 55, 60, 61, 62, 63)
  • ACEF — minterms (43, 47, 59, 63)
  • ABE — minterms (50, 51, 54, 55, 58, 59, 62, 63)
  • ABCF — minterms (57, 59, 61, 63)

How to use the K-map solver

  1. Pick the number of variablesChoose 2 to 6. Five and six variables are drawn as several 4×4 layers whose matching cells are neighbours.
  2. Describe your functionClick cells on the map, fill in a truth table, type a Boolean expression, or list minterms or maxterms. All five views edit the same function.
  3. Mark don't-caresCycle a cell 0 → 1 → X. A don't-care may be treated as 0 or 1, whichever makes the groups bigger.
  4. Choose SOP or POSSum of products groups the ones. Product of sums groups the zeros and gives the maxterm form.
  5. Read the groupsEach coloured outline is one term. The same colour marks the term in the expression and its card, which lists the cells it covers.
  6. Check, build, exportCompare the result with your input in the verification table, open the logic circuit, step through the algorithm, then export or share.

Key features

  • 2 to 6 variables

    Up to 64 cells, with layered maps for 5 and 6 variables.

  • Five ways to enter a function

    Map, truth table, expression, minterm list or maxterm list — switch freely.

  • Provably minimal

    Exact cover search over all prime implicants, with every equally good alternative on offer.

  • Don't-care aware

    X cells enlarge groups but never have to be covered.

  • Wrap-around groups

    Groups across the map edges are drawn as open brackets, the way textbooks show them.

  • Logic circuit

    AND–OR, OR–AND, NAND-only or NOR-only schematics with zoom and gate counts.

  • Self-checking

    Every answer is re-evaluated against your input; a truth table flags any mismatch.

  • Step-by-step

    Quine–McCluskey tables, the prime-implicant chart and Petrick's method.

  • Export and share

    PDF report, PNG/SVG, LaTeX, Verilog, VHDL, C, and a link that reopens your problem.

  • Private and offline-friendly

    Everything runs in your browser. Nothing you enter is uploaded.

Frequently asked questions

Can a 6-variable function have don't-cares?

Yes, exactly like smaller maps: cycle a cell to X or list them in the don't-care field.

Does the six-variable map work on a phone?

Yes. The map scales to the screen width; tap cells to toggle them, and scroll sideways if you need larger cells.