Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce.

Similar presentations


Presentation on theme: "CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce."— Presentation transcript:

1 CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map

2 K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce the simplest SOP or POS expression  K-Map is used to minimize the number of logic gates that are required in a digital circuit  K-Map is similar to a truth table because it presents all of the possible values of the input variables and the resulting output for each

3 K-Map (2)  A graphical tool for simplifying Boolean expression.  Divided into cells, each representing a specific combination of variable values.  Number of cells in K-Map = number of rows in a truth table = total number of possible variable combinations  Eg: 2 variables = 2 2 = 4 cells 3 variables = 2 3 = 8 cells 4 variables = 2 4 = 16 cells

4  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 K-Map (3)

5 Cell Adjacency Adjacent cells on a K-Map differs by only one variable Arrows point between adjacent cells adjacent wrap

6 K-Map SOP Table construction

7 A 0 A 1 0 1 B B Notice that the map is going false to true, left to right and top to bottom 0 0 01 0 0 01 0 1 0 1 10 11 10 11 2 3 2 3 2 Variables K-Map (1) Possible variable combinations: 00 01 10 11 to get SOP=1 0 0 A B to get SOP=1 0 1 A B to get SOP=1 1 0 A B to get SOP=1 1 1 A B SOP

8 3 Variables K-Map (2) Use Gray Code 00A B 01A B 11 A B 10A B 0 1 C C 0 1 0 1 2 3 2 3 6 7 6 7 4 5 4 5 Why the arrangements is like this? There must be a reason… 00 0  0 00 1  1 01 0  2 01 1  3 11 0  6 11 1  7 10 0  4 10 1  5 SOP

9 4 Variables K-Map(3) Gray Code 00A B 01A B 11A B 10A B 0 0 0 1 1 1 1 0 C D C D 0 1 3 2 0 1 3 2 4 5 7 6 4 5 7 6 12 13 15 14 12 13 15 14 8 9 11 10 8 9 11 10 0000  0 0001  1 0011  3 0010  2 0100  4 0101  5 0111  7 0110  6 1100  12 1101  13 1111  15 1110  14 1000  8 1001  9 1011  11 1010  10 SOP

10 K-Map POS Table construction

11 Does it differs from SOP table construction?? AB C The digit combinations are similar BUT the variable combinations differs! 3-Variables K-Map (1)

12 4 Variables K-Map (2) POS AB CD CD

13 The Mapping

14 If X=AB + AB then put an X in both of these cells AAAA B 1 1 From Boolean reduction we know that A B + A B = B From the Karnaugh map we can circle adjacent cell and find that X = B AAAA B 1 1 2 Variables K-Map (1) SOP

15 X = A B C + A B C + A B C + A B C Gray Code 00A B 01A B 11 A B 10A B 0 1 C C Each 3 variable term is one cell on a 4 X 2 Karnaugh map 11 11 3 Variables K-Map (2) SOP

16 X = A B C + A B C + A B C + A B C Gray Code 00A B 01A B 11 A B 10A B 0 1 C C One simplification could be X = A B + A B 11 1 1 3 Variables K-Map (3) SOP Hint to simplify: take the common variable

17 X = A B C + A B C + A B C + A B C Gray Code 00A B 01A B 11 A B 10A B 0 1 C C Another simplification could be X = B C + B C A Karnaugh Map does wrap around 11 11 3 Variables K-Map (4) SOP Hint to simplify: take the common variable

18 X = A B C + A B C + A B C + A B C Gray Code 00A B 01A B 11 A B 10A B 0 1 C C The best simplification would be X = B 11 11 3 Variables K-Map (5) SOP Hint to simplify: take the common variable

19 3 Variables K-Map (6)  Use a K-Map to simplify the following 3- variable minterm SOP expression: X = A B C + A B C + A B C + A B C + A B C X = B + AC  Answer: X = B + AC

20 Grouping the 1s and n-var product term (1) Notice, the group size grows in 2 n style n-varGroup sizen-var product term 212 21 4True=1 313 22 41 8 Refer page 212-213 Floyd, Digital Fundamentals 10 th ed.

21 Grouping the 1s and n-var product term (2) n-varGroup sizen-var product term 414 23 42 81 16True = 1 515 24 43 82 161 32True = 1

22 Gray Code 00A B 01A B 11A B 10A B 0 0 0 1 1 1 1 0 C D C D 1 1 1 1 1 1 X = ABD + ABC + CD Simplify: 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

23 Simplify Simplify : Z = B C D + B C D + C D + B C D + A B C Gray Code 00A B 01A B 11A B 10A B 00 01 11 10 C D C D 1111 11 11 11 1 1 Z = C + A B + B D

24 Mapping on a non-standard SOP BC + AB + ABC + ABCD + ABCD + ABCD The first and second term are both missing two variables, the third term is missing one variable, and the rest of the terms are standard. BC 0000 0001 1000 1001 + AB 1000 100110 1011 + + ++ ABC 1100 1101 ABCD 1010 ABCD 0001 ABCD 1011 11 11 1111 00A B 01A B 11A B 10A B 00 01 11 10 CD CD CD CD

25 Simplify using K-Map (1) Firstly, change the circuit to an SOP expression

26 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 Simplify using K-Map (2) SOP expression How about standard SOP expression???

27 Gray Code 00A B 01A B 11A B 10A B 00 01 11 10 C D C D 1 1 1 1 11 1 1 Y = 1 1 11 1 1 1 1 1 Simplify using K-Map (3)

28 Mapping directly from truth table X=ABC + ABC + ABC + ABC ABCX 0001 0010 0100 0110 1001 1010 1101 1111 01 001 01 1111 101

29 K-Map POS Minimization

30 3 Variables K-Map (2)

31 4 Variables K-Map (2)

32 4 Variables K-Map (3)

33 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 - Examples

34 K-Map with “Don’t Care” Conditions (1) Input Output Example : 3 variables with output “don’t care (X)” Sometimes there occurs situation in which input variable combinations are not allowed (e.g. BCD invalid) but you still need to do minimization. The “not allowed input variable combinations” = don’t care can be used to the advantage of K-Map. If SOP use the ‘X’ as 1; if POS use the ‘’X’ as 0.

35 4 variables with output “don’t care (X)” K-Map with “Don’t Care” Conditions (2)

36 “Don’t Care” Conditions  “Don’t Care” Conditions  Example: Determine the minimal SOP using K-Map: Answer: K-Map with “Don’t Care” Conditions (3)

37 Solution : AB CD 00 01 11 10 00 01 11 10 0 1 1 0 1 X 1 0 X X 0 0 1 0 0 1 3 2 4 5 7 6 12 13 15 14 8 9 11 10 Minimum SOP expression is CD AD BC

38 Exercise  Minimize this expression with a K-Map ABCD + ACD + BCD + ABCD

39 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 minterms (1’s) F (ABCD) = B’D’+B’C’+A’C’D 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’)

40 5 variable K-map (1)  5 variables -> 32 minterms, hence 32 squares required

41 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.

42 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’

43


Download ppt "CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce."

Similar presentations


Ads by Google