# The Structure of a K-Map

A K-Map is a table made of cells or boxes. Each cell represents one possible combination of inputs from a truth table.

The total number of cells is 2ⁿ, where n is the number of input variables.
- For 2 variables (X, Y), we need 2² = 4 cells.
[![](https://learn.digilabdte.com/uploads/images/gallery/2025-09/scaled-1680-/image-1758287483676.png)](https://learn.digilabdte.com/uploads/images/gallery/2025-09/image-1758287483676.png)

  .
- For 3 variables (X, Y, Z), we need 2³ = 8 cells.
[![](https://learn.digilabdte.com/uploads/images/gallery/2025-09/scaled-1680-/image-1758287748148.png)](https://learn.digilabdte.com/uploads/images/gallery/2025-09/image-1758287748148.png)

  .
- For 4 variables (W, X, Y, Z), we need 2⁴ = 16 cells.
[![](https://learn.digilabdte.com/uploads/images/gallery/2025-09/scaled-1680-/image-1758287799460.png)](https://learn.digilabdte.com/uploads/images/gallery/2025-09/image-1758287799460.png)

A special rule for K-Maps is the way the rows and columns are labeled. The binary numbers are ordered so that only one bit changes between any two adjacent cells. This is why the labels are `00, 01, 11, 10` instead of the usual `00, 01, 10, 11`. This special ordering is the key that makes simplification possible.

This ordering also means the map "wraps around." The far-right column is considered adjacent to the far-left column, and the top row is adjacent to the bottom row.