Karnaugh Map Solver Calculator

Minimise 2–6 variable functions from minterms and don’t-cares, with a colour-grouped K-map.

What it does

A Karnaugh map groups the 1s of a function to find its simplest form. Enter the minterms (and any don’t-cares) and get the minimal SOP and POS with colour-coded groups.

Where it's used

Minimising logic for gates or FPGAs and digital-design coursework.

How to use it

  1. Choose the number of variables.
  2. Type the minterms where the output is 1, separated by commas.
  3. Optional: add don’t-care terms.
  4. Read the minimal expression and look at the grouped map.

The formula explained

Minterm
row number (in binary A B C…) whose output is 1
Don’t-care (X)
can be treated as 0 or 1 to make bigger groups
Gray order
rows/columns ordered 00, 01, 11, 10 so neighbours differ by one bit

Worked example

Inputs:

The calculator gives:

Tips and common mistakes

Questions people ask

What are don’t-care terms?

Input combinations that never happen or whose output doesn’t matter — for example codes 10 to 15 in a BCD circuit. The solver may treat them as 1 or 0, whichever gives bigger groups and a simpler answer.

Why are the rows ordered 00, 01, 11, 10?

That is Gray-code order: neighbouring cells differ in only one variable, so a group of adjacent 1s always drops a variable. It is also why groups may wrap around the edges.

How can I check the result?

Put each minterm back into the answer. For F = C + AB, minterm 6 (A = 1, B = 1, C = 0) gives AB = 1, and minterms 1, 3, 5 and 7 all have C = 1 — every 1 is covered and nothing else is.

Related Digital Logic calculators

Enter your values to get the result with the formula, substituted values and an explanation of each step.

All engineering calculators