Karnaugh Map Solver
Minimize Boolean expressions using an interactive 2, 3, or 4 variable Karnaugh Map (K-Map) solver with SOP and POS results.
What is a Karnaugh Map?
A Karnaugh Map (also known as a K-Map) is a visual method used in digital electronics to simplify Boolean algebra expressions. Introduced by Maurice Karnaugh in 1953, it is an extension of Venn diagrams that maps truth tables onto a grid. The grid cells are ordered in Gray code, ensuring that only a single variable changes between adjacent cells. This adjacent grouping enables quick visual identification and elimination of redundant terms.
SOP vs POS Expressions
Karnaugh Maps support two primary forms of Boolean simplification:
- Sum of Products (SOP): Created by grouping the cells containing 1s and Don't Care terms (X). The resulting expression consists of product terms (AND gates) summed together (OR gate). This is the default form for most logic designers.
- Product of Sums (POS): Created by grouping the cells containing 0s and Don't Care terms (X), then applying De Morgan's laws. The resulting expression consists of sum terms (OR gates) multiplied together (AND gate).
To perform other base and binary conversions, explore our All Number Converter or check our Binary to IP Converter.
Frequently Asked Questions
What does 'X' represent in the K-Map?
The 'X' represents a "Don't Care" condition. This means the output value for that specific minterm is unimportant for the circuit. The solver will automatically treat it as either 0 or 1 depending on which option yields a more simplified Boolean expression.
Why are the cell rows and columns ordered as 00, 01, 11, 10?
This ordering is called Gray Code. In Gray Code, adjacent codes differ by exactly one bit. This adjacency is critical for Karnaugh mapping because it allows grouping cells that differ by only one variable, which is the algebraic basis of simplification.
What is the maximum number of variables supported?
This solver supports 2, 3, and 4 variable K-Maps. Four variables correspond to a grid of 16 cells (minterms m0 through m15).