Karnaugh Mapping Digital Electronics Karnaugh Mapping or KMapping

  • Slides: 19
Download presentation
Karnaugh Mapping Digital Electronics

Karnaugh Mapping Digital Electronics

Karnaugh Mapping or K-Mapping This presentation will demonstrate how to • Create and label

Karnaugh Mapping or K-Mapping This presentation will demonstrate how to • Create and label two, three, & four variable K-Maps. • Use the K-Mapping technique to simplify logic designs with two, three, and four variables. • Use the K-Mapping technique to simplify logic design containing don’t care conditions. 2

Karnaugh Map Technique K-Maps are a graphical technique used to simplify a logic equation.

Karnaugh Map Technique K-Maps are a graphical technique used to simplify a logic equation. K-Maps are procedural and much cleaner than Boolean simplification. K-Maps can be used for any number of input variables, BUT are only practical for two, three, and four variables. 3

K-Map Format Each minterm in a truth table corresponds to a cell in the

K-Map Format Each minterm in a truth table corresponds to a cell in the KMap. K-Map cells are labeled such that both horizontal and vertical movement differ only by one variable. Since the adjacent cells differ by only one variable, they can be grouped to create simpler terms in the sum-of-products expression. The sum-of-products expression for the logic function can be obtained by OR-ing together the cells or group of cells that contain 1 s. 4

Adjacent Cells = Simplification V 1 0 1 0 5

Adjacent Cells = Simplification V 1 0 1 0 5

Truth Table to K-Map Mapping Two Variable K-Map W X Minterm – 0 0

Truth Table to K-Map Mapping Two Variable K-Map W X Minterm – 0 0 0 Minterm – 1 0 Minterm – 2 1 0 1 Minterm – 3 1 1 0 V FWX 1 1 1 0 2 0 0 1 3 6

K-Map Simplification Process Construct a label for the K-Map. Place 1 s in cells

K-Map Simplification Process Construct a label for the K-Map. Place 1 s in cells corresponding to the 1 s in the truth table. Place 0 s in the other cells. 2. Identify and group all isolated 1’s. Isolated 1’s are ones that cannot be grouped with any other one, or can only be grouped with one other adjacent one. 1. 3. 4. 5. 6. 7. Group any hex. Group any octet, even if it contains some 1 s already grouped but not enclosed in a hex. Group any quad, even if it contains some 1 s already grouped but not enclosed in a hex or octet. Group any pair, even if it contains some 1 s already grouped but not enclosed in a hex, octet, or quad. OR together all terms to generate the SOP equation. 7

Example #1: 2 Variable K-Map After labeling and transferring the truth table data into

Example #1: 2 Variable K-Map After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F 1. J K F 1 0 0 0 1 1 1 0 0 1 1 0 V 1 8

Example #1: 2 Variable K-Map After labeling and transferring the truth table data into

Example #1: 2 Variable K-Map After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F 1. Solution: J K 0 0 0 1 1 1 0 0 1 1 0 V F 1 1 0 0 9

Truth Table to K-Map Mapping Three Variable K-Map W X Y Minterm – 0

Truth Table to K-Map Mapping Three Variable K-Map W X Y Minterm – 0 0 Minterm – 1 0 0 1 0 Minterm – 2 0 1 0 0 Minterm – 3 0 1 1 0 Minterm – 4 1 0 0 0 Minterm – 5 1 0 1 1 Minterm – 6 1 1 0 1 Minterm – 7 1 1 1 0 V FWXY 1 1 0 0 2 6 4 0 0 0 1 1 3 Only one variable changes for every row change 7 5 10

Example #2: 3 Variable K-Map After labeling and transferring the truth table data into

Example #2: 3 Variable K-Map After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F 2. E F G F 2 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1 0 11

Example #2: 3 Variable K-Map After labeling and transferring the truth table data into

Example #2: 3 Variable K-Map After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F 2. Solution: E F G F 2 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1 0 V 0 1 1 0 0 1 12

Truth Table to K-Map Mapping Four Variable K-Map W X Y Z FWXYZ Minterm

Truth Table to K-Map Mapping Four Variable K-Map W X Y Z FWXYZ Minterm – 0 0 0 Minterm – 1 0 0 0 1 1 Minterm – 2 0 0 1 Minterm – 3 0 0 1 1 0 Minterm – 4 0 1 0 0 1 Minterm – 5 0 1 1 Minterm – 6 0 1 1 0 0 Minterm – 7 0 1 1 Minterm – 8 1 0 0 Minterm – 9 1 0 0 1 0 Minterm – 10 1 0 1 Minterm – 11 1 0 Minterm – 12 1 1 0 0 1 Minterm – 13 1 1 0 Only one variable changes for every column change V 00 11 03 12 14 15 17 06 112 013 115 114 08 09 011 110 Only one variable changes for every row change 13

Example #3: 4 Variable K-Map After labeling and transferring the truth table data into

Example #3: 4 Variable K-Map After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic function F 3. V R S T U F 3 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1 14

Example #3 : 4 Variable K-Map After labeling and transferring the truth-table data into

Example #3 : 4 Variable K-Map After labeling and transferring the truth-table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic V function F 3. Solution: R S T U F 3 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 15

Don’t Care Conditions A don’t care condition, marked by (X) in the truth table,

Don’t Care Conditions A don’t care condition, marked by (X) in the truth table, indicates a condition where the design doesn’t care if the output is a (0) or a (1). A don’t care condition can be treated as a (0) or a (1) in a KMap. Treating a don’t care as a (0) means that you do not need to group it. Treating a don’t care as a (1) allows you to make a grouping larger, resulting in a simpler term in the SOP equation. 16

Some You Group, Some You Don’t V X 0 1 0 0 0 X

Some You Group, Some You Don’t V X 0 1 0 0 0 X 0 This don’t care condition was treated as a (1). This allowed the grouping of a single one to become a grouping of two, resulting in a simpler term. There was no advantage in treating this don’t care condition as a (1), thus it was treated as a (0) and not grouped. 17

Example #4: Don’t Care Conditions After labeling and transferring the truth table data into

Example #4: Don’t Care Conditions After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic V care conditions. function F 4. Be sure to take advantage of the don’t R S T U F 4 0 0 X 0 0 0 1 0 1 0 0 1 1 X 0 1 0 1 X 0 1 1 0 X 0 1 1 1 0 0 0 1 1 1 0 1 1 X 1 1 0 0 X 1 1 0 1 1 1 0 0 1 1 0 18

Example #4: Don’t Care Conditions After labeling and transferring the truth table data into

Example #4: Don’t Care Conditions After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP) logic expression for the logic V care conditions. function F 4. Be sure to take advantage of the don’t Solution: R S T U F 4 0 0 X 0 0 0 1 0 1 0 0 1 1 X 0 1 0 1 X 0 1 1 0 X 0 1 1 1 0 0 0 1 1 1 0 1 1 X 1 1 0 0 X 1 1 0 1 1 1 0 0 1 1 0 X 1 X X 0 0 0 1 1 X 1 19