Karnaugh Map Solver (K-Map)
Simplify Boolean functions instantly with K-Maps, Truth Tables, Expressions, Minterms, and Maxterms.
How would you like to define your K-map?
Click cells to toggle between 0, 1, and X (don't care)
Simplified K-Map Result
Map Groupings
The function is constant; the entire map or no cells are grouped.
Simplified Expression
F = 0
Original Groups Breakdown
- Terms
- 0
- Literals
- 0
- Gates
- 0
Gate-Level Circuit Diagram
Synchronized Truth Table
Updates automatically based on your K-Map input.
How it works
From a boolean function to a minimized, gate-level circuit in four steps.
Choose your variables
Pick 2, 3, 4, or 5 variables to match the boolean function you're minimizing.
Enter your function
Type a boolean expression, list minterms or maxterms, or fill in the truth table directly.
Read the grouped map
Pairs, quads, and octets are outlined automatically as the solver finds the largest valid groups.
Get the minimized result
Copy the simplified SOP or POS expression, view the gate-level circuit, or export a PDF.
What you'll see
A preview of the tool's main views. Scroll to browse.
Advanced Karnaugh Map Solver for Digital Logic
Our solver is a state-of-the-art Karnaugh map calculator designed for digital logic and Boolean expression simplification. It handles any Boolean function of 2–5 variables and operates with academic rigor. We use the full Quine–McCluskey minimization algorithm (with Petrick’s method) to guarantee each solution is provably minimal. In practice this means the final expression has the fewest terms and literals possible, yielding the simplest SOP or POS form. The result is a reliable, optimal simplification that EE/CS instructors trust – not a heuristic guess.
Five Input Methods, One Simplified Result
The solver offers five synchronized input methods: an interactive K-map grid, truth table, Boolean expression, minterm list, or maxterm list. Any change in one view instantly updates all others and the simplified result (all inputs support don’t-care entries). This flexibility lets you work however you prefer and quickly verify your work. You can also toggle between SOP and POS output without re-entering data. The multi-input approach ensures one consistent answer across map, table, and equation modes.
Exact Minimization via Quine–McCluskey
Under the hood, the solver performs a rigorous minimization – not a shortcut. It enumerates all prime implicants using the Quine–McCluskey method and applies Petrick’s technique for any remaining tie-breaking. In short, it finds the absolute minimum Sum-of-Products or Product-of-Sums expression for your function. The practical benefit is the fewest logic gates and smallest circuit for your design. This exact algorithmic approach ensures the solution is mathematically optimal every time.
Educational Focus with Step-by-Step Solutions
Beyond just an answer, our solver is built as a learning aid. Every result includes a complete Quine–McCluskey derivation – prime implicants, essential terms, and any Petrick-method steps – so that the Karnaugh map and algebra “stay one story”. Each grouping is highlighted and explained, aligning the map with the algebraic simplification. You can download a detailed PDF report of the solution, which includes the K-map visualization, each intermediate step, and even an auto-generated logic circuit diagram.