Skip to content
BetterDL

Wrap-around adjacency

Also called: wrap-around, edge adjacency, K-map wrap-around, wrap-around K-map groups

On a K-map, cells at opposite ends of a row or column are adjacent, as if the map were rolled into a tube or torus. Groups may wrap across edges.

A karnaugh map behaves as if its edges were glued together. The left edge touches the right edge, and on a 4-variable map the top edge touches the bottom. Picture the grid rolled into a tube, then the tube bent into a donut.

Why: the axis labels run in gray code, 00, 01, 11, 10, and the step from 10 back to 00 also changes only one bit. So the first and last columns differ in one variable, exactly like any other pair of neighbors.

What this lets you do:

  • Group the two end cells of a row, such as m0 and m2.
  • Group the top and bottom cells of a column in a 4-variable map, such as m1 and m9.
  • Group the four corners as one corner group.
  • Group cells from the first and last columns together, as in the map above.

On a 3-variable map there are only two rows, so top and bottom already touch; only the left-right wrap adds anything new. On a 2-variable map the wrap adds nothing at all.

Missing a wrap is the most common K-map mistake. For every 1 on an edge, check the cell at the other end of its row and of its column.

AB\CD00011110
00
0m0
0m1
0m3
0m2
01
1m4
0m5
0m7
1m6
11
1m12
0m13
0m15
1m14
10
0m8
0m9
0m11
0m10

Worked examples

Example

A group that wraps left to right

Read the group above: m4, m12 in the first column and m6, m14 in the last.

  1. 1.

    Rows: AB = 01 and 11. A changes, B stays 1 → B.

  2. 2.

    Columns: CD = 00 and 10. C changes, D stays 0 → .

  3. 3.

    Term: . Without the wrap you'd need two pairs, and .

Example

Wrapping top to bottom

Are m3 and m11 adjacent in a 4-variable map?

  1. 1.

    m3 = 0011 is in row AB = 00, column CD = 11. m11 = 1011 is in row AB = 10, the same column.

  2. 2.

    Those rows are the top and bottom of the map, which wrap.

  3. 3.

    The codes differ only in A, so yes. The pair reads .

Common mistakes

  • Treating the map as a flat sheet and splitting an end-to-end group into two smaller ones.

  • Thinking diagonal corners such as m0 and m10 are adjacent. They differ in two bits; only all four corners together form a group.

  • Wrapping a 3-variable map top to bottom and calling it special. With two rows, those rows already touch.

Practice Wrap-around adjacency

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Wrap-around adjacency is taught in Karnaugh Maps.