Karnaugh Maps: Simplify Boolean Expressions with K-Maps
A Karnaugh map (K-map) is a visual tool for simplifying Boolean expressions. It rearranges the truth table into a grid where neighbouring cells differ in only one variable, so groups of adjacent 1s reveal which variables are irrelevant and can be dropped from the expression.
K-maps matter because they turn algebraic simplification into pattern recognition: you circle groups on a grid instead of hunting for the right law to apply. They are the standard hand method taught for minimising the small logic functions found in control circuits and exam problems.
Key Concepts
- Cell: one square of the map, corresponding to one truth-table row (minterm).
- Adjacency: cells are neighbours if their labels differ in exactly one variable; columns use Gray code order (00, 01, 11, 10), and edges wrap around.
- Group: a rectangle of 1, 2, 4, 8, or more adjacent cells — always a power of two.
- Variable elimination: when a variable changes value inside a group, it cancels out of the product term for that group.
- Don't-care: an input combination that never occurs, marked X and usable as 0 or 1 to make bigger groups.
How It Works
- Draw the map (2 variables: 2x2; 3 variables: 2x4; 4 variables: 4x4) with Gray-code labels.
- Write 1 in each cell where the function is 1.
- Circle the largest possible power-of-two groups of 1s; groups may overlap and wrap around edges.
- For each group, keep only the variables that do not change across its cells — that is one product term.
- OR the terms of all groups; the result is the minimal SOP.
Worked Example
Simplify the 3-variable function that is 1 on rows 0, 1, 2, 3. In the map these are the four cells with A = 0, forming one group of four covering the whole left half. Across this group, B and C both change (the cells are 000, 001, 010, 011), but A stays 0 throughout. Dropping the changing variables leaves the single term not A. Algebraic check: the four minterms sum to (not A) AND ((not B) AND ((not C) OR C) OR B AND ((not C) OR C)) = (not A) AND ((not B) OR B) = not A. The whole function is just not A.
Common Misconceptions
- "Groups can be any shape or size." Only rectangles of 1, 2, 4, 8, and similar powers of two count — no L-shapes and no groups of 3 or 6.
- "The top and bottom rows are not neighbours." They are: the map wraps around like a cylinder, so edge cells are adjacent.
- "Overlapping groups are wasteful." Overlap is encouraged — a 1 already covered by one group can join another group to make it larger and the term smaller.
Real-World Applications
- Hand minimisation of control logic with up to 4-6 variables in digital design courses and interviews.
- Seven-segment display decoders: the classic K-map exercise maps 4-bit codes to segment outputs.
- Teaching aid: builds intuition for why variables cancel, which transfers to computerised minimisers.
Karnaugh maps simplify Boolean functions by grouping adjacent 1s in power-of-two rectangles, cancelling every variable that changes within a group. Master the Gray-code layout, the wrap-around adjacency and legal group sizes, and minimisation becomes a visual puzzle.
Related blogs
- Boolean Variables and Operations: Explained with Examples
- Boolean Functions and Expressions: Explained with Examples
- Laws of Boolean Algebra: Theorems with Simple Examples
- Canonical Forms Sop Pos: Concepts, Formulas and Examples
- Logic Gates and Circuits: From AND Gates to Adders
- Finite Automata Explained: DFA, NFA and State Diagrams