K-Map Solver
Solve 2-variable, 3-variable and 4-variable Karnaugh maps. Enter minterms and don’t-care terms, or click cells directly on the map.
🧠 Key Insight: A K-map simplifies Boolean logic by grouping adjacent 1 cells in powers of 2: 1, 2, 4, 8 or 16. Bigger groups usually mean simpler logic.
πŸ—ΊοΈ Karnaugh Map Grouping Concept
K-MAP CELLS 1 1 0 0 1 1 0 X SIMPLIFIED LOGIC Y = β€” Click cells to toggle 0 β†’ 1 β†’ X. X means don't-care.
Variable Count
Minterms Output = 1
Don't Care Terms
You can type decimal minterms, or click the K-map cells directly. Cell state cycles: 0 β†’ 1 β†’ X β†’ 0.
Presets:2-var: B3-var: C3-var group4-var example
πŸ—ΊοΈ Interactive Karnaugh Map3 variables Β· A / BC Gray code

πŸ“ K-Map Rules

Group Size
Groups must be powers of 2:
1, 2, 4, 8, 16
Bigger groups simplify more.
Adjacency
Cells are adjacent horizontally or vertically.
K-map edges wrap around.
Diagonal cells are not adjacent.
Don't Care X
X cells can be used as 1 or ignored.
Use them only when they help make bigger groups.
Output Forms
SOP groups 1s.
POS groups 0s.
K-map gives minimized Boolean logic.

πŸ“‹ Quick Reference

Map Sizes
2 variables2 Γ— 2
3 variables2 Γ— 4
4 variables4 Γ— 4
Gray Code
Order00,01,11,10
Purposeone-bit change
Edgeswrap around
Terms
Mintermoutput 1
Maxtermoutput 0
Xdon't care

πŸ“š Engineering Notes

K-map is visual simplificationA Karnaugh map rearranges truth table rows so adjacent cells differ by only one variable.
Bigger groups remove more variablesIf a variable changes inside a group, it disappears from that product term.
Use with Boolean calculatorFor expression-based simplification, use the Boolean Algebra Calculator.
Build the final circuit with gatesAfter K-map simplification, test the resulting gates using the Logic Gate Calculator.

What is a K-Map Solver?

A K-map solver simplifies Boolean logic using a Karnaugh map. It is commonly used in digital electronics to reduce logic expressions before implementing them with AND, OR, NOT, NAND, NOR or XOR gates.

How to use this Karnaugh Map Solver

Select 2, 3 or 4 variables, enter the minterms where the output is 1, optionally add don’t-care terms, and the tool will generate the K-map, simplified SOP expression, POS form and truth table. You can also click cells directly to build the K-map visually.

Related digital logic workflow

Use this page after the Boolean Algebra Calculator or before the Logic Gate Calculator. It fits well with Arduino, Raspberry Pi GPIO and digital IC learning pages.

❓ Frequently Asked Questions

A minterm is a truth table row where the output is 1. In K-map simplification, minterms are the cells you group for SOP logic.
X means don’t-care. It can be treated as 1 or 0 depending on what gives the simpler final expression.
Yes. The left and right edges are adjacent, and the top and bottom edges are adjacent in a Karnaugh map.