K-Map Solver
Solve and minimize Boolean expressions on 2-4 variable Karnaugh maps. Free in-browser K-map calculator.
Loading tool...
What is K-Map Solver?
K-Map Solver is a browser-based tool that solves and minimizes Boolean logic expressions using Karnaugh maps. Enter the minterms (and optional don't-cares) of a 2, 3, or 4 variable function, and the tool renders a visual K-map, color-codes the prime implicant groups, and outputs the simplest sum-of-products expression. Under the hood it uses the Quine-McCluskey algorithm for an exact minimal cover, all computed locally in your browser.
Key Benefits
- Minimizes Boolean expressions to the simplest SOP form
- Visual K-map grid with color-coded prime implicant groups
- Supports 2, 3, 4 variables with optional don't-cares
- Exact minimal cover via the Quine-McCluskey algorithm
- No uploads β everything runs offline in your browser
Common Use Cases
- β’Simplifying digital logic circuits for hardware design
- β’Learning and verifying Karnaugh map grouping in class
- β’Minimizing PLC ladder and embedded firmware conditions
- β’Teaching Boolean algebra and logic minimization
How to Use the K-Map Solver
- Choose variable count: Select 2, 3, or 4 variables for your Boolean function. The grid layout updates to match the K-map size.
- Enter minterms: Type the comma-separated minterm indices where the output equals 1, e.g. 1, 3, 5, 7. Optionally add don't-care indices in the second field.
- Solve: Click Solve. The tool renders the K-map, highlights prime implicant groups in color, and shows the minimized SOP expression.
- Copy your result: Copy the minimized expression or individual groups with the copy buttons. Use Reset to clear and start over.
Key Features
- Solve 2, 3, and 4 variable Karnaugh maps
- Minimizes to the simplest sum-of-products expression
- Color-coded visual grouping of prime implicants
- Optional don't-care minterms for simpler results
- Shows all prime implicants and which were selected
- One-click copy of the minimized expression
Frequently Asked Questions
What is a Karnaugh map?
A Karnaugh map (K-map) is a graphical method for simplifying Boolean algebra expressions. It rearranges the truth table into a 2D grid using Gray code ordering so that adjacent cells differ by only one variable, making it easy to spot and group terms that combine into a simpler product.
How does the tool minimize the expression?
The tool uses the Quine-McCluskey algorithm, an exact minimization method. It finds all prime implicants, then selects a minimal cover that includes every required minterm. This produces the simplest sum-of-products (SOP) form, guaranteed minimal for the given cells.
What are don't-cares and when should I use them?
Don't-care minterms are combinations where the output is never observed, so it can be either 0 or 1. Marking them as don't-cares lets the algorithm treat them as available cells, which often yields a smaller, simpler result than forcing them to 0.
Does this tool send my data anywhere?
No. All K-map solving happens entirely in your browser with no uploads and no server calls. Your minterms and Boolean logic never leave your device, and the tool works offline once loaded.