Skip to content
K-Map Solver

Maxterm K-Map Solver

Given the function as ΠM(…), list the inputs where the output is 0. The solver converts, simplifies and checks the result.

Try an example
Variables

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

F = Σm(1, 3, 4, 6, 7, 9, 11, 12, 13, 14, 15)

11 ones · 0 don't-cares · 5 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)(A+B'+C+D')

2 terms6 literals5 gates Checked against your function

Groups

  • (B+D)Essential
    Maxterms
    (0, 2, 8, 10)
    Original
    (A+B+C+D)(A+B+C'+D)(A'+B+C+D)(A'+B+C'+D)
    Simplified
    (B+D)
  • (A+B'+C+D')Essential
    Maxterms
    (5)
    Original
    (A+B'+C+D')
    Simplified
    (A+B'+C+D')

Truth table check

16 match0 mismatch

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

mABCDYour FResultStatus
0000000 Match
1000111 Match
2001000 Match
3001111 Match
4010011 Match
5010100 Match
6011011 Match
7011111 Match
8100000 Match
9100111 Match
10101000 Match
11101111 Match
12110011 Match
13110111 Match
14111011 Match
15111111 Match
Step-by-step: how the solver gets there (Quine–McCluskey)

Logic circuit

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

Export & share

Files always use the light theme so they print cleanly.

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

What is a maxterm?

A maxterm is a sum of all the variables that is 0 for exactly one input combination: a variable is complemented when it is 1 in that combination. A function is the AND of the maxterms where it should be 0.

Maxterms and minterms are two views of one function

Every cell that is not a maxterm and not a don't-care is a minterm. The solver stores one function and shows it either way, so you can enter maxterms and still read the SOP result.

Worked example: product of sums

A four-variable function that is 0 on five input combinations.

F = ΠM(0, 2, 5, 8, 10)

ABCD0001111000011110

Simplified result

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

  • (B+D) — maxterms (0, 2, 8, 10)
  • (A+B'+C+D') — maxterms (5)

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 does 'Maxterms (0s)' mean?

The listed cells are the ones where F = 0. Everything unlisted is 1, except cells listed as don't-cares.

Will the result be POS?

You choose: the form selector is independent of how you entered the function.