Enter minterms or click the K-map directly
You can type minterms as decimal numbers, add optional don't-care terms, or build the function by clicking cells. Each click cycles a cell through 0, 1, and X so the map is easy to adjust while studying.
Digital logic helper
Use this Karnaugh Map Solver to simplify Boolean expressions for digital logic classes, circuit design practice, and quick homework checks. The map uses correct Gray-code ordering, supports don't-care optimisation, and highlights the groups used in the final SOP expression.
Use comma or space separated decimal minterm numbers. Click any map cell to switch it between 0, 1, and X.
Cells are arranged in Gray-code order. Colored dots show which simplified group covers each cell.
Learn how the solver reads minterms, forms valid K-map groups, and turns each group into an SOP term.
You can type minterms as decimal numbers, add optional don't-care terms, or build the function by clicking cells. Each click cycles a cell through 0, 1, and X so the map is easy to adjust while studying.
Karnaugh maps rely on Gray-code ordering so neighboring cells differ by exactly one variable. This solver displays 2, 3, and 4 variable maps in that order, including the wraparound edges.
After solving, every colored group lists the cells it covers and the variables that remain constant. Variables that change inside a group disappear from that product term.
The current variable count, minterms, and don't-care terms are stored in URL parameters. That makes it easy to share a specific K-map with a classmate or reopen it later.
Follow these steps to simplify a Boolean function with the K-map solver.
Select whether your Boolean function has 2, 3, or 4 variables.
Type decimal minterms such as 0, 2, 5, 7 and add optional don't-care terms if your problem includes them.
Use the Gray-code K-map to check the generated cells, or click cells to switch between 0, 1, and X.
Click Solve to see colored groups, step-by-step explanations, and the final simplified SOP expression.
Quick answers about K-map input, don't-cares, wrapping groups, and SOP simplification.
It supports 2-variable, 3-variable, and 4-variable K-maps.
Yes. Enter don't-care terms as X values, or click a cell until it becomes X. The solver can use them when they create a simpler SOP expression.
Yes. Rows and columns are ordered with Gray code so adjacent cells differ by one variable.
Yes. Groups can wrap across left and right edges, top and bottom edges, and the four corners of a 4-variable map.
The solver generates simplified SOP form, also called Sum of Products form.
Yes. The selected variable count, minterms, and don't-care terms are stored in the URL so the Share Link button can copy a database-free link.