Sub topic 13
Five-variable K-maps
Prerequisites and layout
This chapter assumes that you can read binary numbers, use Boolean operators, and minimize four-variable functions with a Karnaugh map (K-map). A K-map is a visual arrangement of truth-table values that makes adjacent combinations easy to group.
A five-variable function has 32 cells because \(2^5 = 32\). Drawing all 32 cells in one rectangle is inconvenient, so split the map into two four-variable layers. Let the variables be \(A, B, C, D, E\). Use \(E\) to select the layer:
- Layer \(E=0\) contains 16 cells.
- Layer \(E=1\) contains 16 cells.
In each layer, place \(A B\) on the rows and \(C D\) on the columns. Both use Gray-code order: 00, 01, 11, 10.
Adjacency and grouping
Two cells are adjacent when their binary assignments differ in exactly one variable. Adjacency works in three ways:
| Adjacency type | Example | Variable removed |
|---|---|---|
| Within one layer | 00 and 01 columns | One of C or D |
| Wraparound within one layer | 00 and 10 rows | One of A or B |
| Between layers | Same position in \(E=0\) and \(E=1\) | E |
Groups must contain a power of two cells: 1, 2, 4, 8, or 16. A group can extend across both layers. When it does, \(E\) disappears from the resulting product term.
For example, suppose
\[ F(A,B,C,D,E)=\Sigma m(0,1,2,3,16,17,18,19). \]
The listed minterms fill matching cells in both layers. They have \(B=0\) and \(C=0\), while \(A\), \(D\), and \(E\) vary. The eight-cell group therefore gives
\[ F = \overline{B}\,\overline{C}. \]
The group is larger than a group restricted to one layer, so it produces a simpler expression.
SOP and POS minimization
For sum-of-products (SOP) minimization:
- Place 1s in the two layers.
- Include a don't-care cell only when it helps form a larger group.
- Make the largest valid groups possible.
- Write one product term for each group.
For product-of-sums (POS) minimization, group 0s instead. A variable appears uncomplemented in a sum term when it is fixed at 0, and complemented when it is fixed at 1. Variables that change inside the group disappear.
A group may wrap from the first row to the last row or from the first column to the last column. It may also cross from the \(E=0\) layer to the \(E=1\) layer. Diagonal cells are never adjacent.
Exercise
In a five-variable K-map, a group contains all corresponding cells in both layers for one four-cell rectangle. How many cells are in the group, and which variable disappears?
Show answer
The group contains eight cells. The layer variable E disappears because it changes from 0 to 1 while the other fixed variables remain unchanged.