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
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.
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.
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.
Use them only when they help make bigger groups.
Output Forms
SOP groups 1s.
POS groups 0s.
K-map gives minimized Boolean logic.
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.