You are on page 1of 14

Karnaugh maps

The Karnaugh map (K-map) is a tool for simplifying combinational logic. For 3 variables, 8 cells are required (23) ). The map shown is for three variables labeled A, B, and C. Each cell represents one possible product term. Each cell differs from an adjacent cell by only one variable.

Karnaugh maps g p
Cells are usually labeled using 0s and 1s to represent the variable and its complement. The numbers are entered in gray code, to force adjacent cells to be different by only one variable variable. Ones are read as the true variable and zeros are read as the complemented p variable. Alternatively, cells can be labeled with the variable letters. This makes it simple to read but it takes more time preparing read, the map.

Karnaugh maps
K-maps can simplify combinational logic by grouping cells and eliminating variables that change. change p p g Ex. Group the 1s on the map and read the minimum logic. Sol. 1. Group the 1s into two overlapping groups as indicated. 2. 2 Read each group by eliminating any variable that changes across a boundary. 3. The vertical group is read g p 4. The horizontal group is read

Karnaugh maps g p
A 4-variable map has an adjacent cell on each of its four boundaries as shown. Each cell is different only by one variable from an adjacent cell. Grouping follows the rules given in the text. i i th t t The following slide shows an example of reading a four variable map using binary numbers for the variables

Karnaugh maps g p
Ex. Group the 1s on the map and read the minimum logic. Sol. 1. Group the 1s into two separate p p groups as indicated. 2. Read each group by eliminating any variable that changes across a boundary. 3. 3 The upper (yellow) group is read as 4. The lower (green) g p is read (g ) group as

Karnaugh maps g p
SOP and POS forms Boolean expressions can be written in the sum-of-products form (SOP) or in sum of products the product-of-sums form (POS). These forms can simplify the implementation of combinational logic, particularly with PLDs. In both forms, an overbar cannot extend over more than one variable. An A expression is in SOP f i i i form when t or more product terms are summed as h two d tt d in the following examples:

An expression is in POS form when two or more sum terms are multiplied as in the following examples:

Karnaugh maps g p
In SOP standard form (minterm), every variable in the domain must appear in each term. (Canonical form) Ex. Convert to standard form. Sol. Sol The first term does not include the variable C Therefore multiply it by C. Therefore, the (C + C), which = 1: X(A,B,C) = m(0,1,7) In POS standard form (Maxterm), every variable in the domain must appear in i each sum term of the expression. (Canonical form) h f h i (C lf ) Ex. Convert to standard form. Sol. Sol Add and expand the result by rule 12. 12 X(A,B,C) =M(0,6,7)

Karnaugh maps g p
Alternate repsentation of a truth table. Red decimal = minterm value A is the MSB for this minterm numbering Valuable tool for logic minimization. Applies most Boolean theorems&postulates automatically.

Karnaugh maps
K-mapping & minimization steps. Step 1: Generate K-map -Put a 1 in all specified minterms -Put a 0 in all other boxes Step 2: Group all adjacent 1s without including any 0s -All groups (prime implicants) must be rectangular and contain a power-of-2 number of 1s (=1,2,4,8,16,32) - An essential group (essential prime implicant) contains at least 1 minterm not included in any other groups - A given minterm may be included in multiple groups. Step 3: Define product terms using variables common to all minterms in group. Step 4: Sum all essential groups plus a minimal set of remaining groups to obtain a minimum SOP

Karnaugh maps g p
Ex. Z(A,B,C) = m(1,3,6,7)

Karnaugh maps g p
5-variable K-maps

Karnaugh maps
Dont care conditions Ex. Z(A,B,C) = m(1,3,6,7) + d(2) or Z(A,B,C) = M(0,4,5) + D(2)

Karnaugh maps g p
Example: Derive minimal SOP and POS expressions from the following Karnaugh maps. g p

Implementation p
1. Notandor 2.Notorand

3.Nand

4.Nor

You might also like