Documente Academic
Documente Profesional
Documente Cultură
2
Karnaugh Map
3
Karnaugh Map
• At four input variables, Boolean algebra
becomes tedious. Karnaugh maps are both
faster and easier.
5
K-map Method
• An alternate approach to representing a Boolean
functions
• Graphical representation of a Boolean function
6
K-map Method
• All rows in a truth table represented with a square
• Each square represents a minterm
• Number of 1’s Number of minterms
• Example: A 2-variable map
7
K-map Method
• 1’s and 0’s represent function in K-maps
• 1 is put where F = 1 in the truth table
• 0’s are typically not shown
(a) F1 = xy, (b) F2 = x+y
8
Rules for K-maps
• We can reduce functions by circling 1’s in the K-map
• Each circle represents minterm reduction
• Following circling, we can deduce minimized and-or form
• Rules
• Every cell containing a 1 must be included at least once
• Enclose the largest possible “power of 2 rectangle”
• The 1’s must be enclosed in the smallest possible number of
rectangles
9
K-Maps
• In the final figure, we superimpose all three variables,
attempting to clearly label the various regions. The
regions are less obvious without color printing, more
obvious when compared to the other three figures.
• This 3-variable K-Map (Karnaugh map) has 2³ = 8
cells, the small squares within the map. Each
individual cell is uniquely identified by the three
Boolean Variables (A, B, C).
• For example, ABC' uniquely selects the lower right
most cell, A'B'C' selects the upper left most cell
10
11
K-Map Simplification of SOPs
• Grouping the 1s
• Can group the 1s in the adjacent cells.
• Rules
1. A group must contain either 1, 2, 4, 8, or 16 cells, which are
all powers of two. For a 3-variable map, total cells are 8.
2. Each cell in a group must be adjacent to one or more cells
in that same group, but all cells in the group do not have to
be adjacent to each other.
3. Always include the largest possible number of 1s in a group
in accordance with rule 1.
4. Each 1 on the map must be included in at least one group.
The 1s already in a group can be included in another group.
12
K-Map Simplification of SOPs
• Determining the minimum SOP expression from the
Map
• Each group of cells containing 1s creates one product term
composed of all variables that occur in only one form (either
complemented or uncomplemented) within the group.
• Determine the minimum product term for each group.
• For a 3-variable map
• A 1-cell group yields a 3-variable product term
• A 2-cell group yields a 2-variable product term
• A 4-cell group yields a 1-variable term
• An 8-cell group yields a value of 1 for the expression
• When all the minterms are derived, they are summed to form
the minimum SOP expression.
13
3-Variable Karnaugh Maps
• Two variables on one side, one on the other
• Gray codes are used to represent blocks
• Only 1 bit changes in adjacent blocks
14
K-map Blocks
• Identifying blocks in Karnaugh maps
• Neighboring minterms can be combined
• Example
F = x’y’z’ + x’y’z
15
K-map Blocks
• Identifying blocks in Karnaugh maps
• Neighboring minterms can be combined
• Example
F = x’y’z’ + x’y’z = x’y’
• Resulting expression has 2 literals
16
K-map Blocks
• Example:
F ( x, y, z) (2,3,4,5) xyz xyz xyz xyz
• Corresponding K-map
17
K-map Blocks
• Example:
F ( x, y, z) (2,3,4,5) xyz xyz xyz xyz
• Corresponding K-map
18
K-map Blocks
• Exercise
• What is the K-map minimized form of the following expression?
F ( x, y, z) (3,4,6,7)
19
K-map Blocks
• Exercise
• What is the K-map minimized form of the following expression?
F ( x, y, z) (3,4,6,7)
23
K-map Blocks
• Can blocks overlap? Yes
• Example:
F ( A, B, C) (1,2,3,5,7)
24
Converting Blocks into Expressions
• Rule of thumb
• Write down the variables that do not change
F(A,B,C) = C+A’B
25
Example 1 & 2
• Simplify A’B’C’ + A’B’C
26
Example 3
• A’B’C + A’BC + AB’C + ABC
• After mapping the six p-terms above, identify the upper group of four, pick
up the lower two cells as a group of four by sharing the two with two more
from the other group. Covering these two with a group of four gives a
simpler result. Since there are two groups, there will be two p-terms in the
Sum-of-Products result A'+B
28
Example 5
• A’B’C’ + AB’C’ + A’BC’ + ABC’
• Mapping the four p-terms above yields a group of four. Visualize the group
of four by rolling up the ends of the map to form a cylinder, then the cells
are adjacent. We normally mark the group of four as above left. Out of the
variables A, B, C, there is a common variable: C'. C' is a 0 over all four
cells. Final result is C'.
29
Example 6
• A’B’C’ + A’B’C + A’BC + A’BC’ + AB’C’ + ABC’
• The six cells above from the un simplified equation can be organized into
two groups of four. These two groups should give us two p-terms in our
simplified result of A' + C'
30
Function Simplification
• Consider the function f = A′BC + AB′C + ABC′ + ABC
31
32
33
4-variable Karnaugh Map
34
4-variable Karnaugh Map
35
4-Variable K-maps
• Same principle can be extended to 4-variable
expressions
• 16 adjacent squares 1
37
4-Variable K-maps
• Example:
F (w, x, y, z) (0,1,2,4,5,6,8,9,12,13,14)
38
4-Variable K-maps
• Example:
F (w, x, y, z) (0,1,2,4,5,6,8,9,12,13,14)
F ( w, x, y, z ) y wz xz
39
4-Variable K-maps
• Pair
• Group of 2 adjacent minterms
• Eliminates 1 variable
• Quad
• Group of 4 adjacent minterms
• Eliminates 2 variables
• Octet
• Group of 8 adjacent minterms
• Eliminates 3 variables
• Redundant
• All elements are covered by other groups
40
Example 7
41
Example 7
42
Example 8
43
Example 8
44
Explanation
• The four cells above are a group of four
because they all have the Boolean variables B'
and D' in common.
45
Example 9
46
Example 9
47
Example 10
48
Example 10
49
50
Example 11
51
Example 11
52
Example 12
53
Example 12
54
Example 13
55
Example 13
56
Example 14
57
Example 15
58
4-Variable K-maps
• Example:
F AC AB BCD
59
Minterm to Maxterm
60
61
62
• Simplify the Product-Of-Sums Boolean
expression below, providing a result in SOP form.
63
• Then fill in the implied 1s in the remaining cells of the
map above right.
64
65
66
Σ (Sum) and Π (Product) Notation
or
f(A,B,C,D) = Σ(m0,m1,m2,m4,m5,m7,m12,m13,m15)
67
68
f(A,B,C,D) = Π M(2, 6, 8, 9, 10, 11, 14)
or
69
In Product Notation
70
Terminology
• Implicant
• Any product term in the SOP form
• A block of 1’s in a K-map
• Prime implicant
• Product term that cannot be further reduced
• Block of 1’s that cannot be further increased
71
Essential Prime Implicants
• Example:
F ( A, B, C, D) (0,2,3,5,7,8,9,10,11,13,15)
72
Essential Prime Implicants
• Example:
F ( A, B, C, D) (0,2,3,5,7,8,9,10,11,13,15)
73
Incompletely Specified Functions
• Sometimes a function is not completely specified
• For instance, when BCD numbers are handled
74
Don’t Care
75
Don't Care
77
78
• What should be the valid answer:
• Ans = AC
79
5 & 6-Variable Karnaugh-Maps
5 - Variable Karnaugh-Maps
80
5 & 6-Variable Karnaugh-Maps
81