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
- Choose the number of variables.
- Type the minterms where the output is 1, separated by commas.
- Optional: add don’t-care terms.
- 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:
- Variables: 3 (A–C)
- Minterms (1s): 1, 3, 5, 6, 7
The calculator gives:
- Minimal SOP: F = C + AB
- Minimal POS: F = (A + C)(B + C)
Tips and common mistakes
- Groups must be rectangles of 1, 2, 4 or 8 cells, and may wrap around the edges.
- Bigger groups give simpler terms.
- Variable A is the most significant bit.
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
- Binary Calculator
- Number System Converter
- Logic Gate Calculator
- Two's Complement Calculator
- Parity Bit Calculator
- Hamming Code Calculator
- Truth Table Generator
- Gray Code Converter
- Bitwise Calculator
- Bit Shift Calculator
Enter your values to get the result with the formula, substituted values and an explanation of each step.