Skip to content
K-Map Solver

Minterm K-Map Solver

Have the function as Σm(…)? Enter the minterm numbers, add don't-cares if needed, and read the minimal expression.

Try an example
Variables

Range 0–15. Use ranges like 4-7. Every number not listed is 0.

F = Σm(0, 2, 3, 5, 6, 7, 8, 9) + d(10, 11, 12, 13, 14, 15)

8 ones · 6 don't-cares · 2 zeros

Variable namesA B C D

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.

ABCD0001111000011110

Simplified Boolean expression

F =B'D'+C+BD+A

4 terms6 literals5 gates Checked against your function

Groups

  • B'D'Essential
    Minterms
    (0, 2, 8, 10)
    Uses don't-care 10
    Original
    A'B'C'D' + A'B'CD' + AB'C'D' + AB'CD'
    Simplified
    B'D'
  • CEssential
    Minterms
    (2, 3, 6, 7, 10, 11, 14, 15)
    Uses don't-care 10, 11, 14, 15
    Original
    A'B'CD' + A'B'CD + A'BCD' + A'BCD + AB'CD' + AB'CD + ABCD' + ABCD
    Simplified
    C
  • BDEssential
    Minterms
    (5, 7, 13, 15)
    Uses don't-care 13, 15
    Original
    A'BC'D + A'BCD + ABC'D + ABCD
    Simplified
    BD
  • AEssential
    Minterms
    (8, 9, 10, 11, 12, 13, 14, 15)
    Uses don't-care 10, 11, 12, 13, 14, 15
    Original
    AB'C'D' + AB'C'D + AB'CD' + AB'CD + ABC'D' + ABC'D + ABCD' + ABCD
    Simplified
    A

Truth table check

10 match6 don't-care0 mismatch

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

mABCDYour FResultStatus
0000011 Match
1000100 Match
2001011 Match
3001111 Match
4010000 Match
5010111 Match
6011011 Match
7011111 Match
8100011 Match
9100111 Match
101010X1 Either (X)
111011X1 Either (X)
121100X1 Either (X)
131101X1 Either (X)
141110X1 Either (X)
151111X1 Either (X)
Step-by-step: how the solver gets there (Quine–McCluskey)

Logic circuit

Fit
ABCDF
2 AND gates, 1 OR gate and 2 inverters10 gate inputs3 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
  • B' = NOT(B)
  • D' = NOT(D)
  • G1 = AND(B', D')
  • G3 = AND(B, D)
  • F = OR(G1, C, G3, A)

Export & share

Files always use the light theme so they print cleanly.

Images
Expression as
F = \overline{B} \overline{D} + C + B D + A

What is a minterm?

A minterm is a product that includes every variable, plain or complemented, and is 1 for exactly one input combination. Its number is that combination read as a binary value, with A as the most significant bit; for four variables, minterm 5 is 0101 = A'BC'D.

Input format

Separate numbers with commas, or use ranges such as 8-11. The range allowed depends on the variable count: 0 to 2ⁿ − 1. A number in both lists counts as a one.

Worked example: sum of products

Segment e of a seven-segment decoder: on for digits 0, 2, 6 and 8; codes 10–15 are don't-cares.

F = Σm(0, 2, 6, 8) + d(10, 11, 12, 13, 14, 15)

ABCD0001111000011110

Simplified result

F = B'D' + CD'

  • B'D' — minterms (0, 2, 8, 10), includes don't-care 10
  • CD' — minterms (2, 6, 10, 14), includes don't-care 10, 14

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

What range may minterms have?

0 to 3 for two variables, 0–7 for three, 0–15 for four, 0–31 for five and 0–63 for six. Anything outside is reported as an error.

Can I write minterms as m(1,2,3)?

Yes, the wrapper is accepted and ignored.