Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Karnaugh map

A Karnaugh map provides a pictorial method of grouping together expressions with


common factors and therefore eliminating unwanted variables.

Applications:
The Karnaugh map (KM or K-map) is a method of simplifying Boolean algebra
expressions. The Karnaugh map reduces the need for extensive calculations by
taking advantage of humans' pattern-recognition capability. It also permits the
rapid identification and elimination of potential race conditions.

Karnaugh maps are used to simplify real-world logic requirements so that they can
be implemented using a minimum number of logic gates. A sum-of-products
expression (SOP) can always be implemented using AND gates feeding into an OR
gate, and a product-of-sums expression (POS) leads to OR gates feeding an AND
gate. Karnaugh maps can also be used to simplify logic expressions in software
design. Boolean conditions, as used for example in conditional statements, can get
very complicated, which makes the code difficult to read and to maintain. Once
minimised, canonical sum-of-products and product-of-sums expressions can be
implemented directly using AND and OR logic operators.

Hardware structures and behaviours of K-map method:


Karnaugh maps are a graphical way of using the relationship AB+ AB = A to simplify
a boolean expression and thus simplify the resulting circuit. A Karnaugh map is a
completely mechanical method of performing this simplification, and so has an
advantage over manipulation of expressions using Boolean algebra. Karnaugh maps
are effective for expressions of up to about six variables.

K-map can take two forms Sum of Product (SOP) and Product of Sum (POS)
according to the need of the problem. K-map is table-like representation but it
gives more information than TRUTH TABLE.
The shape and size of the map is dependent on the number of binary inputs in the
circuit to be analysed. The map needs one cell for each possible binary word applied
to the inputs.
Therefore:

2 input circuits with inputs A and B require maps with 2^2 = 4 cells.

3 input circuits with inputs A B and C require maps with 2^3 = 8 cells.

4 input circuits with inputs A B C and D require maps with 2^4 = 16 cells.

Further, each cell within a K-map has a definite place-value which is obtained by
using an encoding technique known as Gray code.

The specialty of this code is the fact that the adjacent code values differ only by
a single bit. That is, if the given code-word is 01, then the previous and the next
code-words can be 11 or 00, in any order, but cannot be 10 in any case.

In K-maps, the rows and the columns of the table use Gray code-labeling which in
turn represent the values of the corresponding input variables. This means that
each K-map cell can be addressed using a unique Gray Code-Word.

To use a Karnaugh map to simplify an expression:

1. Draw a “map” with one box for each possible product term in the expression.
The boxes must be arranged so that a one-box movement either horizontal or
vertical changes one and only one variable. See Figure 1.
2. For each product term in the expression to be simplified, place a checkmark in
the
box whose labels are the product's variables and their complements.
3. Draw loops around adjacent pairs of checkmarks. Blocks are "adjacent"
horizontally and vertically only, not diagonally. A block may be "in" more than
one loop, and a single loop may span multiple rows, multiple columns, or both, so
long as the number of checkmarks enclosed is a power of two.
4. For each loop, write an unduplicated list of the terms which appear; i.e. no
matter
how many times A appears, write down only one A.
5. If a term and its complement both appear in the list, e.g. both A and A , delete
both from the list.
6. For each list, write the Boolean product of the remaining terms.
7. Write the Boolean sum of the products from Step 5; this is the simplified
expression.

You might also like