Download presentation
Presentation is loading. Please wait.
Published byTeresa Watts Modified over 8 years ago
1
Minimisation ENEL111
2
Minimisation Last Lecture Sum of products Boolean algebra This Lecture Karnaugh maps Some more examples of algebra and truth tables
3
Karnaugh Maps K-Maps are a convenient way to simplify Boolean Expressions. They can be used for up to 4 or 5 variables. They are a visual representation of a truth table. Expression are most commonly expressed in sum of products form.
4
Truth table to K-Map ABP 001 011 100 111 B A01 011 11 minterms are represented by a 1 in the corresponding location in the K map. The expression is: A.B + A.B + A.B
5
K-Maps Adjacent 1’s can be “paired off” Any variable which is both a 1 and a zero in this pairing can be eliminated Pairs may be adjacent horizontally or vertically B A 01 011 11 a pair another pair B is eliminated, leaving A as the term A is eliminated, leaving B as the term The expression becomes A + B
6
Returning to our car example Two Variable K-Map ABCP 0000 0010 0101 0110 1001 1010 1101 1110 A.B.C + A.B.C + A.B.C BC A00011110 01 111 One square filled in for each minterm. Notice the code sequence: 00 01 11 10 – a Gray code.
7
Grouping the Pairs BC A 00011110 01 111 equates to B.C as A is eliminated. Here, we can “wrap around” and this pair equates to A.C as B is eliminated. Our truth table simplifies to A.C + B.C as before.
8
Groups of 4 BC A00011110 011 111 Groups of 4 in a block can be used to eliminate two variables: The solution is B because it is a 1 over the whole block (vertical pairs) = BC + BC = B(C + C) = B.
9
Karnaugh Maps Three Variable K-Map Extreme ends of same row considered adjacent A BC 00011110 0 1 00 10
10
Karnaugh Maps Three Variable K-Map example A BC 00011110 0 1 X =
11
The Block of 4, again A BC 00011110 0 11 1 11 X = C
12
Returning to our car example, once more Two Variable K-Map ABCP 0000 0010 0101 0110 1001 1010 1101 1110 A.B.C + A.B.C + A.B.C AB C00011110 0111 1 There is more than one way to label the axes of the K-Map, some views lead to groupings which are easier to see.
13
Don’t Care States Sometimes in a truth table it does not matter if the output is a zero or a one Traditionally marked with an x. We can use these as 1’s if it helps. AB C 00011110 011 1xx1 ABCP 0000 001x 0101 011x 1001 1010 1101 1110
14
Karnaugh Maps Four Variable K-Map Four corners adjacent AB CD 00011110 00 01 11 10
15
Karnaugh Maps Four Variable K-Map example AB CD 00011110 00 01 11 10 F =
16
AB CD 00011110 00 11 01 11 11 10 11 Karnaugh Maps Four Variable K-Map solution F = B.D + A.C 1
17
Product-of-Sums We have populated the maps with 1’s using sum-of-products extracted from the truth table. We can equally well work with the 0’s AB C 00011110 0111 11 ABCP 0000 0010 0101 0111 1001 1010 1101 1110 AB C 00011110 00 1000 P = (A + B).(A + C) P = A.B + A.C equivalent
18
Inverted K Maps In some cases a better simplification can be obtained if the inverse of the output is considered i.e. group the zeros instead of the ones particularly when the number and patterns of zeros is simpler than the ones
19
Karnaugh Maps Example: Z5 of the Seven Segment Display 0000100001 0001000010 0011000110 0100001000 0101001010 0110101101 0111001110 1000110001 X1X2X3X4Z5 1001010010 1010X1010X 1011X1011X 1100X1101X1110X1111X1100X1101X1110X1111X 01234567890123456789 0010100101 X 1 X 2 X3 X4 00011110 00 01 11 10 Z5 = Better to group 1’s or 0’s?
20
7-segment display If there are less 1’s than 0’s it is an easier option: X X 1 X 2 X3 X4 00011110 00 1001 01 0001 11 XXX 10 10XX Changing this to 1 gives us the corner group.
21
Tutorial - Friday Print out the CS1 tutorial questions from the website. Come to see the answers worked through.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.