Download presentation
Presentation is loading. Please wait.
Published byLoren Gray Modified over 9 years ago
1
CS151 Introduction to Digital Design Chapter 2-4-1 Map Simplification
2
CS 151 Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization is a more formal approach to simplification that is performed using a specific procedure or algorithm Optimization requires a cost criterion to measure the simplicity of a circuit To distinct cost criteria we will use: Literal cost (L) Gate input cost (G) Gate input cost with NOTs (GN)
3
CS 151 Literal – a variable or its complement Literal cost – the number of literal appearances in a Boolean expression corresponding to the logic circuit diagram Examples: F = BD + A C + A L = 8 F = BD + A C + A + AB L = F = (A + B)(A + D)(B + C + )( + + D) L = Which solution is best? Literal Cost D DBC B BD C BC
4
CS 151 Gate Input Cost Gate input costs - the number of inputs to the gates in the implementation corresponding exactly to the given equation or equations. (G - inverters not counted, GN - inverters counted) For SOP and POS equations, it can be found from the equation(s) by finding the sum of: all literal appearances the number of terms excluding terms consisting only of a single literal,(G) and optionally, the number of distinct complemented single literals (GN). Example: F = BD + A C + A G = 11, GN = 14 F = BD + A C + A + AB G =, GN = F = (A + )(A + D)(B + C + )( + + D) G =, GN = Which solution is best? D B C B B D C B D B C
5
CS 151 Example 1: F = A + B C + Cost Criteria (continued) A B C F B C L = 5 L (literal count) counts the AND inputs and the single literal OR input. G = L + 2 = 7 G (gate input count) adds the remaining OR gate inputs GN = G + 2 = 9 GN(gate input count with NOTs) adds the inverter inputs
6
CS 151 Example 2: F = A B C + L = 6 G = 8 GN = 11 F = (A + )( + C)( + B) L = 6 G = 9 GN = 12 Same function and same literal cost But first circuit has better gate input count and better gate input count with NOTs Select it! Cost Criteria (continued) B C A A B C F CB F A B C A
7
CS 151 Map Simplification Simplifying Boolean Expressions Algebraic manipulation Lacks rules for predicting steps in the process Difficult to determine if the simplest expression has been reached Map simplification (Karnough map or K-map) Straightforward procedure for function of up to 4 variables Provides a pictorial form of the truth table Maps for five and six variables can be drawn, but are more cumbersome to use
8
CS 151 Karnaugh Maps (K-map) A K-map is a collection of squares Each square represents a minterm Adjacent squares differ in the value of one variable Visual diagram of all possible ways a function may be expressed in standard forms Sum-of-Products Product-of-Sums Alternative algebraic expressions for the same function are derived by recognizing patterns of squares select simplest.
9
CS 151 Two-Variable Map 2 variables 4 minterms 4 squares. Y’Y XX’
10
CS 151 K-Map Function Representation Example: F(X,Y) = XY’ + XY From the map, we see that F (X,Y) = X. This can be justified using algebraic manipulations: F(X,Y) = XY’ + XY = X(Y’ +Y) = X.1 = X 1
11
CS 151 K-Map Function Representation Example: G(x,y) = m1 + m2 + m3 1 11 G(x,y) = m1 + m2 + m3 = X’Y + XY’ + XY From the map, we can see that G = X + Y
12
CS 151 How can we locate a minterm square on the map? Use figure (a) OR use column # and row # from figure (b) E.g. m 5 is in row 1 column 01 (5 10 = 101 2 ) Three-Variable Maps 3 variables 8 minterms (m0 – m7). Q. Show the area representing X’? Y’? Z’?
13
CS 151 Alternative Map Labeling Map use largely involves: Entering values into the map, and Reading off product terms from the map. Alternate labelings are useful: y z x 1 0 2 4 3 5 6 7 x y z z y y z z 1 0 2 4 3 5 6 7 x 0 1 00011110 x
14
CS 151 Example Functions By convention, we represent the minterms of F by a "1" in the map and leave the minterms of F’ blank Example: Learn the locations of the 8 indices based on the variable order shown (x, most significant and z, least significant) on the map boundaries 00101101 1 0 X Z Y X YZ 11 11 00101101 1 0 X Z Y X YZ 1 111
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.