A K-map's edges aren't really edges — they wrap around, and cells on opposite sides of the grid are just as adjacent as cells sitting right next to each other. This is the single most commonly missed rule in K-map grouping, so here's every wraparound case laid out visually and verified.
Why wraparound exists at all
Row and column headers use Gray code ordering (00, 01, 11, 10), not plain counting order. That specific sequence makes the first and last entries differ by only one bit too — exactly the same adjacency relationship as any two neighboring entries. See Gray Code Explained for the full mechanism. Wraparound isn't a special exception bolted onto K-maps — it's a direct, automatic consequence of Gray code ordering.
Case 1: left-right wrap
The leftmost and rightmost columns of any row are adjacent. On a 4-variable map, minterms 0 and 2 sit in the first and last columns of the same row:
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 01 | 10 | 30 | 21 |
| 01 | 40 | 50 | 70 | 60 |
| 11 | 120 | 130 | 150 | 140 |
| 10 | 80 | 90 | 110 | 100 |
Verified: minterms 0 and 2 combine into A′B′D′ — C drops out, since C is exactly the bit that differs between the wrapped columns.
Case 2: top-bottom wrap
The top and bottom rows are adjacent the same way. Minterms 0 and 8 sit in the first and last rows of the same column:
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 01 | 10 | 30 | 20 |
| 01 | 40 | 50 | 70 | 60 |
| 11 | 120 | 130 | 150 | 140 |
| 10 | 81 | 90 | 110 | 100 |
Verified: minterms 0 and 8 combine into B′C′D′ — A drops out this time, since A is the bit differing between the wrapped rows.
Case 3: four-corner wrap
Both wraps at once. The four corners of the entire map are mutually adjacent, forming a valid group of four:
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 01 | 10 | 30 | 21 |
| 01 | 40 | 50 | 70 | 60 |
| 11 | 120 | 130 | 150 | 140 |
| 10 | 81 | 90 | 110 | 101 |
Verified: minterms 0, 2, 8, and 10 combine into a single group of four, B′D′ — both A and C drop out, since both are wrapping simultaneously.
For 5- and 6-variable maps: wraparound applies inside every tile
Multi-tile maps have the same wraparound rules within each individual tile, plus an additional adjacency rule between corresponding positions across tiles — covered fully, with its own worked examples, in Reading 5- and 6-Variable Multi-Tile Karnaugh Maps.
Practice spotting wraparound directly: try the solver with the 🎲 random example button, or review the full mistake list in Common Karnaugh Map Mistakes.