You are on page 1of 6

ENEL111

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.

The expression is: A.B + A.B + A.B

Page 1
1

@E¤US1R2QP@H¤(D§B"¤98 G ( T6 ) I ) )

55 4 55 4 321§0('&%$#"! )  
Last Lecture This Lecture
A 0 0 1 1 B 0 1 0 1 P 1 1 0 1

£  ¡ ¡ ¡ ¥¡©¨§¦¥¤£¢  & (  BA ( 8( F@EDC3@9"76 4 4 4 4

Sum of products Boolean algebra Karnaugh maps Some more examples of algebra and truth tables

B A 0 1 0 1 1 1 1

minterms are represented by a 1 in the corresponding location in the K map.

Here.C + A.B.B. BC A 0 1 1 00 01 11 equates to B.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 0 B is eliminated. Groups of 4 in a block can be used to eliminate two variables: 10 1 1 Our truth table simplifies to A. leaving B as the term another pair Notice the code sequence: 00 01 11 10 – a Gray code. leaving A as the term The expression becomes A + B Two Variable K-Map A B C 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 P 0 0 1 0 1 0 1 0 0 1 1 1 1 a pair 1 A is eliminated.C as B is eliminated.C as A is eliminated.B.C + B. we can “wrap around” and this pair equates to A.C as before.C + A. BC A 00 0 1 01 11 1 1 10 1 1 . The solution is B because it is a 1 over the whole block (vertical pairs) = BC + BC = B(C + C) = B.C    1 F318 &E9 § ¡ ¦ & 280F©Q §BU3$ 318 ( ¨ ) A E9 4 4 4 & ( F@E¤T 6 § BC A 0 1 00 01 11 10 1 1 1 One square filled in for each minterm. Page 2 2 2QI D0( ¥F8 @(£PD1 U3$" 8 '9@)Q E # ¤Q ¢ 8 91 ) A  A.

C 11 A.C + A.B.C 0 1 A.C A.C 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 AB C 0 1 00 01 1 11 1 10 1 There is more than one way to label the axes of the K-Map.B.C + A.B.C A.B. B.B. C 01 A.C + A. B.C A. some views lead to groupings which are easier to see.B.B.C Extreme ends of same row considered adjacent Two Variable K-Map A B C P 0 0 1 0 1 0 1 0 A BC 00 1 1 01 11 10 1 1 0 1 X=C 0 0 0 0 1 1 1 1 Page 3 3 Q "1 # 031 £¤2QI D0( ¥F8 @(£PD1 U3$" 8 '9@)Q 8 Q¢ E # ¤Q ¢ 8 91 ) A  & (  B ( 8( F@EDCA @9" 76 4 Three Variable K-Map example X = A.C + A.B.B. . B.C + A.B.C 00 A.B.B.C BC ¡ ¦ $0C@AC¥1 £¢¢ 21I ¡Q B G ( (¤    & (  BA ( 8( F@EDC3@9"76 5 4 A 00 01 11 10 0 1 X= A. C 10 A.C 10 A.B.Three Variable K-Map A BC 00 A. B.C A.B. C A.B.

D + A.C.C.C.C.C.C.B.B.C.B.D + A.B.C.D + A.C.D A.D A.B.C.B.D A.B.B.C.C. AB C 00 01 11 10 4 Sometimes in a truth table it does not matter if the output is a zero or a one & (  B ( 8( F@EDCA @9" 76 Four Variable K-Map AB 00 01 11 10 CD § § & Q0§() ¦Q( ¤) ¢31 ) ¥ 8 £¡ & (  BA ( 8( F@EDC3@9"76 4   00 A.B.C.C.D A. 0 1 x 1 x 1 1 Four Variable K-Map example F = A.C.C.B.B.C.B.B.C.D A.B.B.D AB 00 01 11 10 00 01 11 10 1 1 1 1 1 1 1 F = B.B.D CD AB 00 01 11 10 00 01 11 10 F= Page 4 4 & (  B ( 8( F@EDCA @9" 76 Four Variable K-Map solution F = A.D A.C.D + A.C.B.B.B.D + A.B.B.C.B.D + A.D A.D + A.D A.B.C.C.B.B.C.D A.C.D 10 A.B.D A.C.D 11 A.D + A.B.D + A.C.D Four corners adjacent A.D + A.B.B.D 01 A.B.C.D A.D A.A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 P x 1 x 1 0 1 0 Traditionally marked with an x.C .C.B.D A.D A.C.B.D + A.D CD 5 4 § 0 We can use these as 1’s if it helps.D A.D + A.C.C.B.B.C.D + A.C.

e. We can equally well work with the 0’s AB 00 C 0 0 1 0 11 1 10 1 01 11 10 0 0 AB C 0 1 00 01 1 1 P = (A + B). group the zeros instead of the ones particularly when the number and patterns of zeros is simpler than the ones 00 01 11 10 1 0 X 1 0 0 X 0 0 0 X X 1 1 X X Changing this to 1 gives us the corner group.(A + C) P = A.A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 P 0 0 1 1 1 0 1 0 We have populated the maps with 1’s using sum-of-products extracted from the truth table.B + A.C equivalent X1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 X2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 X3 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 X4 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Z5 1 0 1 0 0 0 1 0 1 0 X X X X X X X1X2 X3 X4 0 1 2 3 4 5 6 7 8 9 00 01 11 10 00 01 11 10 Z5 = • Better to group 1’s or 0’s? Page 5 5 4 Example: Z5 of the Seven Segment Display If there are less 1’s than 0’s it is an easier option: X1X2 X3 X4 00 01 11 10 ¨ © 55 4 & F@E(  6 ¥Q)0Q ¤ ¢   8 £ !(I E& 3§"@Q C &QA C¦  ) # T & "9 ¥ T1T @)¢ ¡18 ¨ #  9  & (  BA ( 8( F@EDC3@9"76 ¦ In some cases a better simplification can be obtained if the inverse of the output is considered i. .

Come to see the answers worked through.Print out the CS1 tutorial questions from the website. ¨ ©   Page 6 6 ( 8  I 8 3  P¡T 0!("1) 9 G 4 4 .