Karnaugh map

From Rice Wiki
Revision as of 15:43, 17 April 2024 by Rice (talk | contribs) (→‎Simplify)

The Karnaugh map (Kmap) is a matrix that represent output values of a boolean function. It is primarily used to reduce digital circuits.

Minterm

A minterm is a term that consists of all inputs, complemented or not.

Matrix

Kmap minimize equations graphically. Each cell represent an input. There cannot be more than one bit change from one column to the next.

If there are more variables, multiple is placed for an axis. Note the restriction regarding bit change means that conventional order of inputs is invalid.

Simplify

Circle 1's in adjacent squares. Every grouping represents a term. A grouping has to be a power of 2 and be as large as possible. A grouping can wrap around edges.

Don't-cares can be included or excluded depending on whether it minimizes the equation.

How it works

Adjacent columns/rows have one bit difference. If two 1's are adjacent, it means that that particular one bit difference does not matter for a particular term. A simplification is then found.