Skip to content
K-Map Solver

Truth Table to K-Map Solver

Set the output of every input row to 0, 1 or X and let the solver find the simplest expression. The map, expression and circuit stay in sync.

Try an example
Variables

Pick the output of every row: 0, 1 or X (don't care). Keyboard: ↑ ↓ change row, ← → change value, or press 0, 1, X.

Truth table rows 0 to 7
#ABCF
0000
1001
2010
3011
4100
5101
6110
7111

F = Σm(3, 5, 6, 7)

Unsimplified (SOP): F = A'BC + AB'C + ABC' + ABC

Variable namesA B C

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.

ABC0001111001

Simplified Boolean expression

F =BC+AC+AB

3 terms6 literals4 gates

Groups

  • BCEssential
    Minterms
    (3, 7)
    Original
    A'BC + ABC
    Simplified
    BC
  • ACEssential
    Minterms
    (5, 7)
    Original
    AB'C + ABC
    Simplified
    AC
  • ABEssential
    Minterms
    (6, 7)
    Original
    ABC' + ABC
    Simplified
    AB

Truth table check

8 match0 mismatch

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

mABCYour FResultStatus
000000 Match
100100 Match
201000 Match
301111 Match
410000 Match
510111 Match
611011 Match
711111 Match

Glitch check (static-1 hazards)

None found

Every pair of neighbouring 1-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
ABCF
3 AND gates and 1 OR gate9 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(B, C)
  • G2 = AND(A, C)
  • G3 = AND(A, B)
  • F = OR(G1, G2, G3)

Export & share

Files always use the light theme so they print cleanly.

Images
Expression as
F = B C + A C + A B

From table to map

A truth table lists every input combination in binary order. A K-map holds the same information in Gray-code order so that adjacent cells differ by one variable. The solver converts between the two for you; edit either and the other updates.

Entering a table

Each row has a button that cycles 0, 1 and X. Rows are numbered by their minterm index, and variable A is the most significant bit. Use “Fill all with 1” or “Clear all” for a fast start.

Worked example: sum of products

The sum output of a full adder is 1 when an odd number of inputs are 1.

F = Σm(1, 2, 4, 7)

ABC0001111001

Simplified result

F = A'B'C + A'BC' + AB'C' + ABC

  • A'B'C — minterms (1)
  • A'BC' — minterms (2)
  • AB'C' — minterms (4)
  • ABC — minterms (7)

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

Can the truth table hold don't-cares?

Yes. Set a row's output to X to mark it as a don't-care.

Why does the sum of a full adder not simplify?

Its ones sit on a checkerboard: no two are neighbours, so no group larger than one cell exists.