ECE 233 Intro to Digital Systems Topics Karnaugh Maps K maps ECE 233 Intro to Digital Systems 1 Administrative Homework 3 due Monday 12 18 23 No Lab on Wednesday 12 13 23 lecture instead ECE 233 Intro to Digital Systems 2 Review Boolean Algebra is like normal algebra but there are only two values 0 and 1 Can use theorems to simplify Boolean expressions Simplified expressions mean better circuits less gates less area less delay etc ECE 233 Intro to Digital Systems 3 Karnaugh Maps Optimization by algebraic manipulation can create an optimal implementation but There is no set procedure for how to proceed no step by step Can be difficult to see when optimal is achieved Karnaugh Maps aka K maps Way to visually represent a Boolean function Same info as a truth table but different organization Allows for a systematic approach to optimization Really just applying Boolean Algebra simplification ECE 233 Intro to Digital Systems 4 Basic Idea Behind K maps Rearrange the way we represent a truth table Such that we can more easily identify when we can combine minterms to eliminate one or more lateral i e by factoring Solving K maps is similar to applying the following sequence of Boolean algebra transformations AC 1 AC In this example B was factored out ECE 233 Intro to Digital Systems 5 Two Variable K Map A two variable function has 4 minterms so a two variable K map has four squares X Y minterm 0 0 0 1 1 0 1 1 X Y 0 1 0 1 X Y X Y X Y X Y The key to K maps Adjacent squares represent minterms that can be combined to drop a variable lateral ECE 233 Intro to Digital Systems 6 Mapping and Solving a Two Variable K map A B F 0 0 0 0 1 1 1 0 0 1 1 1 A B 0 1 0 0 0 1 1 1 ECE 233 Intro to Digital Systems 7 Mapping and Solving a Two Variable K map A B F 0 0 0 0 1 1 1 0 0 1 1 1 F B A B 0 1 0 0 0 1 1 1 For SoP form we group or circle adjacent 1s and include the corresponding product term s in our equation The K map highlights the fact that A can be eliminated by showing F 1 whenever B 1 regardless of the value of A F 0 whenever B 0 regardless of the value of A ECE 233 Intro to Digital Systems 8 Mapping and Solving a Two Variable K map Therefore grouping adjacent terms says For a certain variable B the output F stays the same regardless of whether A is a 1 or 0 e g F B F B Remember 1 T5 Complement ECE 233 Intro to Digital Systems 9 Another K map Example CD CD C D G 0 0 0 0 1 1 1 0 1 1 1 0 C D 0 1 0 0 1 1 1 0 Need to make sure all 1s are contained in a circle However we can only group 1s into the same group if they are adjacent Sometimes the most simplified SoP version of a function is actually sum of minterms form i e no simplification ECE 233 Intro to Digital Systems 10 K maps vs Boolean Algebra Using a K map C D 0 0 0 1 1 1 1 1 C D C D G 0 0 0 0 1 1 1 0 1 1 1 1 Solving Algebraicly Write the function as a sum of minterms redundant CD term To factor you need to OR in a C D ECE 233 Intro to Digital Systems 11 Gray Code Larger K maps need Gray Code Gray Code binary sequence where the successive values differ by one bit E g 00 01 11 10 11 Note 01 11 not 01 10 Why do K maps use Gray Code Gray Code ensures that adjacent K map squares differ by exactly one variable or one bit ECE 233 Intro to Digital Systems 12 Three Variable K map A three variable function has 8 minterms so a three variable K map has eight squares The K map is usually organized as a 4x2 array i e two variables The numbers on the two variable axis follow a Gray Code not a on horizontal axis binary count X YZ 0 00 m0 1 m4 01 m1 m5 11 m3 m7 10 m2 m6 ECE 233 Intro to Digital Systems 13 Mapping and Solving a Three Variable K map Remember Gray Code when filling in K maps A BC 0 1 00 0 1 01 1 1 11 1 1 10 0 1 A B C F 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 ECE 233 Intro to Digital Systems 14 Mapping and Solving a Three Variable K map Can group more than two adjacent 1s together Size of groups must be a power of 2 i e 1x1 1x2 2x1 2x2 4x1 1x4 etc F is always 1 if C is 1 regardless of A B values A BC 0 1 00 0 1 01 1 1 11 1 1 10 0 1 A C F is 1 if either A or C are 1 F is always 1 if A is 1 regardless of B C values ECE 233 Intro to Digital Systems 15 Are Overlapping Groups of 1s Bad With overlap Without overlap A BC 0 1 00 0 1 A BC 0 1 00 0 1 01 1 1 01 1 1 11 1 1 11 1 1 10 0 1 10 0 1 A C Top circuit is smaller because group is bigger A AC ECE 233 Intro to Digital Systems 16 K map Groupings Minimum group size is 1x1 a single minterm Can increase group size by doubling it in a dimension i e including adjacent squares but only if it encompasses more 1s Each time we double the size of a group we remove one variable from that group s product Remember groups can wrap around the K map sides Groups are rectangular shapes with powers of two lengths 1 2 4 8 for each term side Bigger groups mean smaller AND gates because it means fewer input variables into the AND gate Fewer groups mean fewer AND gates and a smaller OR gate because there are fewer product terms i e inputs into the OR gate ECE 233 Intro to Digital Systems 17 Methodology for Solving K maps 1 If a truth table is given map the output to the correct K map squares You may need to solve the truth table first 2 Go entry by entry through the K map and circle the single entry 1s that cannot be circled with any other adjacent 1 3 Increase the groupings to 2 and go entry by entry finding groups of two adjacent 1s that can only be circled one way …
View Full Document