Lukas' Notes

logic

Definition

Karnaugh Map

A Karnaugh map (K-map) is a graphical method for simplifying Boolean expressions. It arranges minterms in a grid where adjacent cells differ by exactly one variable — a Gray code ordering — so that groups of adjacent s correspond to simplified product terms.

Each cell corresponds to one minterm. Cells are adjacent horizontally, vertically, and across edges (the map wraps around toroidally). A group of adjacent s eliminates variables, producing a simpler product term. The goal is to cover all s with the fewest, largest such groups.

Example

Example

In the map above, two groups cover all s:

  • The row spans all four columns, so and stay fixed, yielding .
  • The two rows with and the two edge columns with form a wrapping group of , yielding .

The simplified expression is .