CprE 28: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/
Minimization CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev
Administrative Stuff HW4 is out It is due on Monday Sep 9 @ 4 pm It is posted on the class web page I also sent you an e-mail with the link.
Example: K-Map for the 2- Multiplexer
2- Multiplexer (Definition) Has two inputs: x and Also has another input line s If s=, then the output is equal to x If s=, then the output is equal to
Circuit for 2- Multiplexer x s s f x f (b) Circuit (c) Graphical symbol [ Figure 2.33b-c from the textbook ]
Truth Table for a 2- Multiplexer [ Figure 2.33a from the textbook ]
[ Figure 2.33a from the textbook ] Let s Draw the K-map
Let s Draw the K-map
Let s Draw the K-map
Let s Draw the K-map
Let s Draw the K-map
Let s Draw the K-map f (s, x, ) = x + s x
Let s Draw the K-map f (s, x, ) = x + s x Something is wrong!
Compare this with the SOP derivation
Let s Derive the SOP form
Let s Derive the SOP form
Let s Derive the SOP form Where should we put the negation signs? s x s x s x s x
Let s Derive the SOP form s x s x s x s x
Let s Derive the SOP form s x s x s x s x f (s, x, ) = s x + s x + s x + s x
Let s simplify this expression f (s, x, ) = s x + s x + s x + s x
Let s simplify this expression f (s, x, ) = s x + s x + s x + s x f (s, x, ) = s x ( + ) + s (x +x )
Let s simplify this expression f (s, x, ) = s x + s x + s x + s x f (s, x, ) = s x ( + ) + s (x +x ) f (s, x, ) = s x + s
Let s Draw the K-map again [ Figure 2.33a from the textbook ]
Let s Draw the K-map again
Let s Draw the K-map again
Let s Draw the K-map again
Let s Draw the K-map again s x The order of the labeling matters.
Let s Draw the K-map again s x
Let s Draw the K-map again s x
Let s Draw the K-map again s x
Let s Draw the K-map again s x f (s, x, ) = s x + s This is correct!
Two Different Ways to Draw the K-map x x 3 m x x 3 m m 2 m m 2 m 6 m 4 m 3 m 4 m m 3 m 7 m 5 m 5 (b) Karnaugh map m 6 m 7 x 3 x (a) Truth table m m m 3 m 2 m 4 m 5 m 7 m 6
Another Way to Draw 3-variable K-map x x 3 m m m 2 m 3 m 4 m 5 m 6 m 7 x x 3 m m m 3 m 2 m 6 m 7 (b) Karnaugh map x x 3 m 4 m 5 (a) Truth table m m 4 m m 5 m 3 m 7 m 2 m 6
Gray Code Sequence of binary codes Consecutive lines vary by only bit
Gray Code & K-map s x
Gray Code & K-map s x
Gray Code & K-map s x These two neighbors differ only in the LAST bit
Gray Code & K-map s x These two neighbors differ only in the LAST bit
Gray Code & K-map s x These two neighbors differ only in the FIRST bit
Gray Code & K-map s x These two neighbors differ only in the FIRST bit
Adjacency Rules s x adjacent columns
Gray Code & K-map s x These four neighbors differ in the FIRST and LAST bit They are similar in their MIDDLE bit
A four-variable Karnaugh map x x x 3 x 4 m m 4 m 2 m 8 m m 5 m 3 m 9 x 3 m 3 m 2 m 6 m 7 m 5 m 4 m m x 4 [ Figure 2.53 from the textbook ]
A four-variable Karnaugh map x x2 x3 x4 m m m2 m3 m4 m5 m6 m7 m8 m9 m m m2 m3 m4 m5 x x 3 x 4 x 3 m m m 5 m 3 m 2 m 6 m 4 m 2 m 3 m 7 m 5 m 4 x m 8 m 9 m m x 4
Adjacency Rules adjacent rows adjacent columns adjacent columns
Gray Code & K-map x x2 x3 x4 m m m2 m3 m4 m5 m6 m7 m8 m9 m m m2 m3 m4 m5 x x 3 x 4 x 3 m m m 5 m 3 m 2 m 6 m 4 m 2 m 3 m 7 m 5 m 4 x m 8 m 9 m m x 4
Gray Code & K-map x x2 x3 x4 m m m2 m3 m4 m5 m6 m7 m8 m9 m m m2 m3 m4 m5 x x 3 x 4 x 3 m m m 5 m 3 m 2 m 6 m 4 m 2 m 3 m 7 m 5 m 4 x m 8 m 9 m m x 4
Example of a four-variable Karnaugh map [ Figure 2.54 from the textbook ]
Example of a four-variable Karnaugh map [ Figure 2.54 from the textbook ]
Strategy For Minimization
Grouping Rules Group s with rectangles Both sides a power of 2: x, x2, 2x, 2x2, x4, 4x, 2x4, 4x2, 4x4 Can use the same minterm more than once Can wrap around the edges of the map Some rules in selecting groups: Try to use as few groups as possible to cover all s. For each group, try to make it as large as you can (i.e., if you can use a 2x2, don t use a 2x even if that is enough).
Terminology Literal: a variable, complemented or uncomplemented Some Examples: _ X X 2
Terminology Implicant: product term that indicates the input combinations for which function output is Example _ x - indicates that x and x yield output of _ x
Terminology Prime Implicant Implicant that cannot be combined into another implicant with fewer literals Some Examples x x x 3 x 3 Not prime Prime
Terminology Essential Prime Implicant Prime implicant that includes a minterm not covered by any other prime implicant Some Examples x 3 x
Terminology Cover Collection of implicants that account for all possible input valuations where output is Ex. Ex. x x 3 + x x 3 + x x 3 x x 3 + x x 3 x x 3
Give the Number of Implicants? Prime Implicants? Example Essential Prime Implicants? x x 3
Why concerned with minimization? Simplified function Reduce the cost of the circuit Cost: Gates + Inputs Transistors
Three-variable function f (x,, x 3 ) = Σ m(,, 2, 3, 7) x 3 x x x 3 [ Figure 2.56 from the textbook ]
Example x x 3 x 4
Example x x 3 x 4
Example x x 3 x 4 x x 3 x 4 x 3 x 4 x x 3 x 4 x 3 x 4
Example: Another Solution x x 3 x 4 x x 3 x 4 x 3 x 4 x x 3 x 4 x 3 x 4 x x 4 x x 4 x x 3 x x 3 [ Figure 2.59 from the textbook ]
f ( x,, x 4 ) = Σ m(2, 3, 5, 6, 7,,, 3, 4) x x 3 x 4 x x 4 x 3 x 4 x 3 x 4 x x 3 x 3 [ Figure 2.57 from the textbook ]
x f ( x,, x 4 ) = Σ m(, 4, 8,,, 2, 3, 5) x 3 x 4 x 3 x 4 x x 3 x x 4 x x 3 x 4 x x 3 x x 4 [ Figure 2.58 from the textbook ]
Minimization of Product-of-Sums Forms
Do You Still Remember This Boolean Algebra Theorem?
Let s prove 4.b
Let s prove 4.b
Let s prove 4.b
Let s prove 4.b
Let s prove 4.b
Let s prove 4.b They are equal.
Grouping Example x x 2 x M M 2
Grouping Example x x 2 x x * = M * M 2 = M * M 2
Grouping Example x x 2 x x * = M * M 2 = M * M 2
Grouping Example x x 2 x x * = M * M 2 = M * M 2
Grouping Example x x 2 x x * = M * M 2 = M * M 2 _ ( x + ) * ( x + ) = Property 4b (Combining)
POS minimization of f (x,, x 3 ) = Π M(4, 5, 6) x 3 x ( x + x 3 ) ( x + ) [ Figure 2.6 from the textbook ]
POS minimization of f ( x,, x 4 ) = Π M(,, 4, 8, 9, 2, 5) x x 3 x 4 ( x 3 + x 4 ) ( + x 3 ) ( x + + x 3 + x 4 ) [ Figure 2.6 from the textbook ]
Questions?
THE END