Skip to content
BetterDL

K-map layout

Also called: Karnaugh map layout, K-map labeling, K-map labels, K-map axis labels, K-map cell numbering

How a Karnaugh map's rows and columns are labeled and where each minterm sits. This course puts A (or AB) on the rows and the rest on the columns, in Gray order.

The layout of a K-map is the choice of which variables label the rows, which label the columns, and in what order. This course always uses:

  • 2 variables: rows A, columns B
  • 3 variables: rows A, columns BC
  • 4 variables: rows AB, columns CD
  • both axes in gray code order: 00, 01, 11, 10
  • A as the most significant bit, so a cell's minterm number is its row bits followed by its column bits

Other books and instructors may:

  • swap the axes, such as BC down the side and A across the top
  • put different variables on each axis, such as CD on the rows and AB on the columns
  • mark edges with bars showing where a variable is 1, instead of bit labels
  • print the minterm number in a corner of each cell

None of this changes the answer. Touching cells still differ in one variable, and every group still reads to the same term. Only the position of each minterm moves.

To read any layout safely, read the row and column labels for a cell, then rewrite the bits in the order A, B, C, D. That binary number is the minterm. Never find a cell by counting along the grid.

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

Worked examples

Example

Naming cells in this course's layout

The map above has 1s in two cells. Which minterms are they?

  1. 1.

    Third row (AB = 11), first column (CD = 00): bits 1100 = m12.

  2. 2.

    Bottom row (AB = 10), last column (CD = 10): bits 1010 = m10.

Example

Translating a different layout

A textbook map has CD on the rows and AB on the columns. A 1 sits in row CD = 00, column AB = 01. Which minterm is it?

  1. 1.

    Read the labels: C = 0, D = 0 from the row; A = 0, B = 1 from the column.

  2. 2.

    Rewrite in the order A, B, C, D: 0100.

  3. 3.

    That is m4. In this course's layout it sits in row AB = 01, column CD = 00: same cell, different spot.

Common mistakes

  • Counting cells left to right to find a minterm. Gray order puts m3 before m2, so counting goes wrong.

  • Assuming every map uses the same axes. Always read the labels first.

  • Writing the bits in label order instead of A, B, C, D order when the axes are swapped.

Practice K-map layout

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

Learn it step by step

K-map layout is taught in Karnaugh Maps.