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)

Unsimplified (POS): F = (A+B+C+D)(A+B+C'+D)(A+B'+C+D')(A'+B+C+D)(A'+B+C'+D)

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

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

Glitch check (static-0 hazards)

None found

Every pair of neighbouring 0-cells shares a group, so a single input change cannot make this two-level circuit glitch.

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. Choose 2 to 6 variablesPick how many inputs your function has.
  2. Enter your functionClick the map, fill a truth table, type an expression, or list minterms or maxterms.
  3. Mark don't-caresTap a cell to cycle 0, 1 and X.
  4. Switch between SOP and POSSee the answer as a sum of products or a product of sums.
  5. See the groupsColour-coded loops on the map match each term of the answer.
  6. Check and exportView the logic circuit, compare the truth table, then save a PDF or share a link.

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.