What is Karnaugh map?

A diagram that arranges a truth table so that adjacent cells differ in one bit. Grouping neighboring 1s lets you simplify a logic expression visually.

Field: Logic circuits

Japanese name: カルノー図

Layout and Gray-code ordering

A Karnaugh map has one cell per row of the truth table: 4 cells for two variables, 8 for three and 16 for four, typically drawn as a 4 × 4 grid with two variables along each side. The row and column labels run in Gray-code order, 00, 01, 11, 10, so neighboring cells differ in exactly one variable. Opposite edges are also adjacent, since 10 and 00 differ by one bit, so the map behaves like a surface that wraps around in both directions.

Grouping rules

Circle rectangular groups of 1s whose sizes are powers of two: 1, 2, 4, 8 or 16 cells. A group of 2ᵏ cells eliminates k variables, so groups should be as large as possible, and they may overlap. Each group becomes a product term containing only the variables that stay constant within it, and ORing the groups gives a minimal sum of products. Grouping the 0s instead yields a product of sums. Don't-care cells may be included in a group whenever that makes the group larger.

Worked example: the four corners

Take a four-variable function of A, B, C and D that is 1 only for minterms 0, 2, 8 and 10, that is, ABCD = 0000, 0010, 1000 and 1010. With AB labeling the rows and CD the columns, these sit in the four corner cells. Because the edges wrap around, the corners form one group of four. Within it A and C both change while B and D stay 0, so the whole function reduces to the single term B̄D̄.

Hazards and larger problems

Karnaugh maps also reveal static hazards: if two adjacent 1s are covered by different groups with no group spanning both, the output can glitch briefly when the input moves between them, and adding the redundant bridging group removes the glitch. Manual maps become unwieldy beyond four or five variables. Larger functions are minimized with the tabular Quine-McCluskey method or heuristic algorithms such as those in logic synthesis tools, which also handle multiple outputs and real gate libraries.

Try it: questions about Karnaugh map

What is the main use of a Karnaugh map?

  1. AMeasuring circuit delay
  2. BDesigning analog filters
  3. CSimplifying logic expressions
Show answer and explanation

Answer: C. Simplifying logic expressions

A Karnaugh map arranges a truth table so that adjacent cells differ in only one input bit (Gray-code order). Grouping adjacent 1s in rectangles of a power-of-two number of cells (1, 2, 4, 8…) eliminates the variables that change within each group, simplifying the expression; note that the edges wrap around and count as adjacent. Manual use tops out at about four or five variables; beyond that, the Quine-McCluskey method or synthesis-tool algorithms are used.

FAQ

Why are Karnaugh map labels in Gray code order?

Gray code changes one bit between neighbors, so physically adjacent cells differ in one variable, and that variable drops out when the cells are grouped.

How many variables can a Karnaugh map handle?

Comfortably up to four, and five or six with stacked or mirrored maps; beyond that the Quine-McCluskey method or software minimizers are used.

Is the minimal expression from a Karnaugh map unique?

Not always. Some functions have several equally minimal groupings, all of which are correct.

Questions that mention Karnaugh map (1)

Karnaugh map appears in 2 practice questions across 1 topic, including Logic circuits.

  1. Which is a characteristic of Gray code?

Books on Logic circuits Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

Semiconductor, Electronics and Computing Calculators

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary