440 likes | 937 Views
Pgt 104 ELEKTRONIK DIGIT . CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. K-Map (1). Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit. This will replace Boolean reduction when the circuit is large.
E N D
Pgt 104ELEKTRONIK DIGIT CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
K-Map (1) • Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit. • This will replace Boolean reduction when the circuit is large. • Write the Boolean equation in a SOP form first and then place each term on a map.
K-Map (2) • A graphical tool for simplifying Boolean expression. • Divided into cells, each representing a specific combination of variable values. • Number of cells = total possible combinations of the variables in an expression • Eg: 3 variables = 23 = 8 cells 4 variables = 24 = 16 cells
K-Map (3) • The map is made up of a table of every possible SOP using the number of variables that are being used. • If 2 variables are used then a 2X2 map is used • If 3 variables are used then a 4X2 map is used • If 4 variables are used then a 4X4 map is used • If 5 Variables are used then a 8X4 map is used
Simplifying an SOP Expression Step 1: Place a 1 in each cell corresponding to a minterm in the SOP expression. Step 2: Group all 1s that are adjacent cells into groupings of the maximum number of cells. A group can only contain a number of 1s equal to a power of two or groups can overlap. Step 3: For each group, determine the variables that are the same. A complemented and an uncomplemented variable are not the same and cancel each other. Step 4: Write the resulting product terms for each group, using only the variables that are the same within the group. Step 5: Combine the resulting product terms into an SOP expression which will be equivalent to the original SOP expression.
2 Variables K-Map (1) B B A A Notice that the map is going false to true, left to right and top to bottom 0 1 2 3 B B The upper right hand cell is A B if X= A B then put an X in that cell A A 1 This show the expression true when A = 0 and B = 0
2 Variables K-Map (2) B B If X=AB + AB then put an X in both of these cells A A 1 1 From Boolean reduction we know that A B + A B = B B B From the Karnaugh map we can circle adjacent cell and find that X = B A A 1 1
3 Variables K-Map (1) Gray Code 00 A B 01 A B 11 A B 10 A B 0 1 C C 0 1 2 3 6 7 4 5
3 Variables K-Map (2) X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B 0 1 C C 1 1 Each 3 variable term is one cell on a 4 X 2 Karnaugh map 1 1
3 Variables K-Map (3) X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B 0 1 C C One simplification could be X = A B + A B 1 1 1 1
3 Variables K-Map (4) X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B 0 1 C C Another simplification could be X = B C + B C A Karnaugh Map does wrap around 1 1 1 1
3 Variables K-Map (5) X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B 0 1 C C The Best simplification would be X = B 1 1 1 1
3 Variables K-Map (6) • Use a K-Map to simplify the following 3-variable minterm SOPexpression: • X = A B C + A B C + A B C + A B C + A B C • Answer: X = B + AC
On a 3 Variables K-Map • One cell requires 3 Variables • Two adjacent cells require 2 variables • Four adjacent cells require 1 variable • Eight adjacent cells is a 1
4 Variables K-Map Gray Code 00 A B 01 A B 11 A B 10 A B 0 0 0 1 1 1 1 0 C D C D C D C D 0 1 3 2 4 5 7 6 12 13 15 14 8 9 11 10
4 Variables K-Map Gray Code 00 A B 01 A B 11 A B 10 A B 0 0 0 1 1 1 1 0 C D C D C D C D 0 1 3 2 4 5 7 6 12 13 15 14 8 9 11 10 A B A B C C D D D
Simplify:X = A B C D + A B C D + A B C D + A B C D + A B C D + A B C D Gray Code 00 A B 01 A B 11 A B 10 A B 0 0 0 1 1 1 1 0 C D C D C D C D Now try it with Boolean reductions 1 1 1 1 1 1 X = ABD + ABC + CD
On a 4 Variables K-Map • One Cell requires 4 variables • Two adjacent cells require 3 variables • Four adjacent cells require 2 variables • Eight adjacent cells require 1 variable • Sixteen adjacent cells give a 1 or true
Simplify: Z = B C D + B C D + C D + B C D + A B C Gray Code 00 A B 01 A B 11 A B 10 A B 00 01 11 10 C D C D C D C D 1 1 1 1 1 1 1 1 1 1 1 1 Z = C + A B + B D
Simplify using K-Map (1) Firstly, change the circuit to an SOP expression
Simplify using K-Map (2) Y= A + B + B C + ( A + B ) ( C + D) Y = A B + B C + A B ( C + D ) Y = A B + B C + A B C + A B D Y = A B + B C + A B C A B D Y = A B + B C + (A + B + C ) ( A + B + D) Y = A B + B C + A + A B + A D + B + B D + AC + C D SOP expression How about standard SOP expression???
Simplify using K-Map (3) Gray Code 00 A B 01 A B 11 A B 10 A B 00 01 11 10 C D C D C D C D Y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
3 Variables K-Map (1) Gray Code 0 0 0 1 1 1 1 0 C 0 1 AB 0 1 2 3 6 7 4 5
4 Variables K-Map (1) 0 0 0 1 1 1 1 0 C D 0 0 0 1 1 1 1 0 A B 0 1 3 2 4 5 7 6 12 13 15 14 8 9 11 10
K-Map - Examples • Mapping a Standard SOP expression • Example: Answer: • Mapping a Standard POS expression • Example: Using K-Map, convert the following standard POS expression into a minimum SOP expression Answer: Y = AB + AC or standard SOP:
K-Map with “Don’t Care” Conditions (1) Example : Input Output 3 variables with output “don’t care (X)”
K-Map with “Don’t Care” Conditions (2) 4 variables with output “don’t care (X)”
K-Map with “Don’t Care” Conditions (3) • “Don’t Care” Conditions • Example: Determine the minimal SOP using K-Map: Answer:
Solution: CD 00 01 11 10 AB 0 1 1 0 1 X 1 0 X X X X 0 0 1 0 00 01 11 10 • 0 1 3 2 • 5 7 6 • 13 15 14 • 8 9 11 10 AD BC CD Minimum SOP expression is
Exercise • Minimize this expression with a K-Map ABCD + ACD + BCD + ABCD
K-map POS & SOP Simplification Example: Simplify the Boolean function F(ABCD)=(0,1,2,5,8,9,10) in (a) S-of-P (b) P-of-S Using the maxterms (0’s) and complimenting F Grouping as if they were minterms, then using De- Morgen’s theorem to get F. F’(ABCD)= BD’+CD+AB F(ABCD)= (B’+D)(C’+D’)(A’+B’) Using the minterms (1’s) F(ABCD)= B’D’+B’C’+A’C’D
5 variable K-map (1) • 5 variables -> 32 minterms, hence 32 squares required
5 variable K-map (2) • Adjacent squares. E.g. square 15 is adjacent to 7,14,13,31 and its mirror square 11. • The centre line must be considered as the centre of a book, each half of the K-map being a page • The centre line is like a mirror with each square being adjacent not only to its 4 immediate neighbouring squares, but also to its mirror image.
5 variable K-Map (3) Example: Simplify the Boolean function F(ABCDE) = (0,2,4,6,11,13,15,17,21,25,27,29,31) Soln: F(ABCDE) = BE+AD’E+A’B’E’
6 variable K-map • 6 variables -> 64 minterms, hence 64 squares required