Digital Logic Design
3‑Variable Karnaugh Map Solver
Simplify Boolean expressions visually. Click cells to set 0 or 1 – the minimal Sum‑of‑Products (SOP) expression updates instantly.
00 (B'C')
01 (B'C)
11 (BC)
10 (BC')
A=0 (A')
A=1 (A)
Gray code ordering: adjacent cells differ by only one variable. Click any cell to toggle 0 ↔ 1.
Minimized Sum‑of‑Products (SOP) Expression
f(A,B,C) = 0
💡 Loading logic design facts...
📖 What is a Karnaugh Map?
A Karnaugh map (K‑map) is a graphical method to simplify Boolean algebra expressions. For 3 variables, the map has 2 rows (for A) and 4 columns (for B,C arranged in Gray code: 00,01,11,10). Adjacent cells differ by only one variable, allowing grouping of 1s to eliminate variables.
🔗 Learn more: Wikipedia – Karnaugh map | All About Circuits – K‑Map
🧮 How to Use This Tool
- Click any cell to set its value to 1 (green) or 0 (grey).
- The K‑map layout follows Gray code: columns BC = 00,01,11,10; rows A=0 (top), A=1 (bottom).
- The tool automatically detects all prime implicants and returns the minimal SOP expression.
🧠 Simplification Rules
- Groups of 2 adjacent 1s eliminate 1 variable.
- Groups of 4 adjacent 1s (quad) eliminate 2 variables.
- Wrap‑around adjacency (top/bottom, left/right) is supported.
- Example: If cells 000,001,010,011 are 1 → eliminates B and C → term A'.
💡 Pro Tip
For a 3‑variable K‑map, the expression will be a sum of terms (ANDs) where each term corresponds to a group of adjacent 1s. Try filling a checkerboard pattern to see a more complex expression.