Download
karnaugh maps n.
Skip this Video
Loading SlideShow in 5 Seconds..
Karnaugh Maps PowerPoint Presentation
Download Presentation
Karnaugh Maps

Karnaugh Maps

225 Views Download Presentation
Download Presentation

Karnaugh Maps

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Karnaugh Maps

  2. Boolean algebra can be represented in a variety of ways. These include: • Boolean expressions • Truth tables • Circuit diagrams • Another method is the Karnaugh Map (also known as the K-map) • K-maps are particularly useful for simplfyingboolean expressions What are karnaugh maps?

  3. Starting with the Expression: A ∧ B • As a Truth Table this would be: • As a Circuit Diagram this would be: • A K-Map, will be a small grid with 4 boxes, one for each combination of A and B. Each grid square has a value for A and a value for B. • To complete the K-Map for theexpression, you find the box inthe row where A is true and thecolumn where B is true, put a 1in the box that is in both rows. 2 variable K-Map 1

  4. One way to view a K-Map is to figure out what the ‘address’ is for each box: • what its A and B values are for each position • These have been written in the format (A, B) (0,0) (0,1) (1,0) (1,1) 2 variable K-Map

  5. To create a K-map for the expression: A • Place 1s in all the boxes in the row where A is true 2 variable K-Map 1 1

  6. To create a K-Map for the expression B • Place 1s in all the boxes in the column where B is true 2 variable K-Map 1 1

  7. Expression: ~A ∧ B • Find the row where A is false and the column where B is true • Place a 1 in the overlapping position 1 2 variable K-Map

  8. Try working backwards! • Starting with the K-Map, interpret the results and write an expression • Highlight the row that contains the 1 • Is it A or ~A? • Highlight the column that contains the 1 • Is it B or ~B? • Write down your two variables andjoin them with an AND (∧) 2 variable K-Map 1

  9. Try working backwards! • Starting with the K-Map, interpret the results and write an expression • Highlight the row that contains the 1 • Is it A or ~A? • Highlight the column that contains the 1 • Is it B or ~B? • Write down your two variables andjoin them with an AND (∧) 2 variable K-Map 1 1

  10. In a 3 variable K-Map, we need to accommodate 8 possible combinations of A, B and C • We’ll start by figuring out the ‘address’ for each position(A, B, C) (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,1,0) (1,1,1) (1,0,0) (1,0,1) 3 variable K-Map

  11. If we had a K-Map where the expression was B • We would place 1s in every box where B is true • We ignore the values of A and C, because they are not written in our expression 3 variable K-Map 1 1 1

  12. Create a K-map for the expression: ~A ∧ C • Highlight rows where A is false • Highlight columns where C is true • Place 1s in all the overlapping boxes • Note: We can ignore the values of B, because they are not mentioned in the expression 1 3 variable K-Map

  13. To create the K-Map for the expression A ∧B∧~C • Highlight rows where A is true • Highlight rows where B is false • Highlight columns where C is false • Place 1s in all the overlapping boxes 3 variable K-Map

  14. This time we’ll start with a K-map and find the expression. • Identify any groupings (in this case we have a pair) • What is the value of A for both items in the pair? • What is the value of B for both items in the pair? • What is the value of C for both items in the pair? 1 1 3 variable K-Map

  15. This time we’ll start with a K-map and find the expression. • Identify any groupings (in this case we have a pair) • What is the value of A for both items in the pair? • What is the value of B for both items in the pair? • What is the value of C for both items in the pair? • Because B is both true and false, it does not affect the answer and can be ignored 1 1 ~A ∧ C 3 variable K-Map

  16. Determine the expression represented by this K-map • Identify any groupings • What is the value of A for both items in the pair? • What is the value of B for both items in the pair? • What is the value of C for both items in the pair? 3 variable K-Map 1 1

  17. Determine the expression represented by this K-map • Identify any groupings (I see two pairs) • What is the value of A for both items in the first pair? • What is the value of B for both items in the first pair? • What is the value of C for both items in the first pair? • First Pair: • What is the value of A for both items in the second pair? • What is the value of B for both items in the second pair? • What is the value of C for both items in the second pair? • Second Pair: • Put brackets around each pair andcombine them with an OR 1 1 3 variable K-Map 1 1

  18. Working backwards to build an expression • Identify any groupings (I see two pairs) • What are the value of A, B, C values for the first pair? • What are the value of A, B, C values for the second pair? • First Pair: • Second Pair: • Put brackets around each pair andcombine them with an OR 1 1 3 variable K-Map 1 1

  19. Working backwards to build an expression • Identify any groupings (I see two pairs) • When I look more closely, I can see they are both ~B, so perhaps I can view it as a group of 4 • What are the value of A, B, C values for the group? 1 1 3 variable K-Map 1 1

  20. Some notes to add at this point: • Groupings can only be exact binary values: 1, 2, 4, 8You cannot have a groupings of 3 • Groups can overlap • The bigger the groupings, the simpler the resulting expression/circuit • When converting from a truth table to a K-Map, simply use the values in the TT to find the position values within the K-Map K-Map Notes

  21. In a 4 variable K-Map, we need to accommodate 16 possible combinations of A, B, C and D • We’ll start by figuring out what the ‘address’ for each position(A, B, C, D) (0,0,0,0) (0,0,0,1) (0,0,1,1) (0,0,1,0) (0,1,0,0) (0,1,0,1) (0,1,1,1) (0,1,1,0) (1,1,0,0) (1,1,0,1) (1,1,1,1) (1,1,1,0) (1,0,0,0) (1,0,0,1) (1,0,1,1) (1,0,1,0) 4 variable K-Map

  22. If we had a K-Map where the expression was D • We would place 1s in every box where D is true • We ignore the values of A, B and C, because they are not written in our expression 1 1 1 1 1 1 1 1 4 variable K-Map

  23. If we had a K-Map where the expression was:A ∧ ~B ∧ ~C ∧ ~D • We would highlight the • Rows where A is true • Rows where B is false • Columns where C is false • Columns where D is false • place 1s in all theoverlapping boxes • (When you have all 4 variablesin your expression, it will onlyresult in a single value in theK-Map) 1 4 variable K-Map

  24. If we had a K-Map where the expression was:(A ∧D) • We highlight the: • Rows where A is true • Columns where D is true • Put 1s in all overlappingboxes 1 1 1 1 4 variable K-Map

  25. If we had a K-Map where the expression was:(A ∧B) ∨(B∧C ∧~D) • We would work with one pair at a time. • For each part of the expression: • Identify the overlapping boxes • Place 1s in them • We have resulted in a: • Group of 4 • Pair 1 1 1 1 1 4 variable K-Map

  26. Working backwards • Identify any groupings (I see a group of 4) • What is the value of A for the items in the group? • What is the value of B for the items in the group? • What is the value of C for the items in the group? • What is the value of D for the items in the group? 1 1 1 1 4 variable K-Map

  27. Working backwards • Identify any groupings (I see a group of 4 and a pair) • What are the values of A, B, C and D for the group? • What are the values of A, B, C and D for the pair? • Solution 1 111 1 1 4 variable K-Map

  28. Often we are asked to write an expression based on a truth table, this can result in pretty complicated expressions that require simplification using logic laws • Using a K-Map can aid the simplification process K-Maps & Truth Tables

  29. Let’s start with a Truth Table • To build an expression we would normally write an expression (using AND’s) for each row resulting in true and combine those with ORs • This produces a really big expression that will be difficult to simplify using the logic laws (~A∧~B∧C)∨(~A∧B∧C)∨(A∧~B∧C)∨(A∧B∧~C)∨(A∧B∧C) K-Maps & Truth Tables

  30. Rather than converting straight to an expression, let’s try placing the values in a Karnaugh Map. • Place 1s in the appropriate positions, according to the Truth Table • This highlights a group of 4 and a pairFrom this we can write a simpler expression 1111 1 K-Maps & Truth Tables

  31. The best way to learn how to work with K-Maps, is to apply your new knowledge to some Karnaugh Maps worksheets Practise, Practise, Practise