K-Map Using different rules and properties in Boolean algebra can simplify Boolean equations May involve many of rules / properties during simplification Difficult to determine which rule should be used in a particular step K-Map is a systematic way to find a minimum-cost expression Base on the property below in Boolean algebra xy’+xy = x (x + y)(x + y’) = x
Minterm & maxterm minterm (mi) can be viewed as binary representation of index i maxterm (Mi) can be viewed as the complement of binary representation of index I (Mi is true when Mi = 0) The range of i is [0,2n-1] which n is the no. of variables in the function
Minterm & maxterm index x1 x2 x3 Minterm (mi) Maxterm (Mi) x1' x2' x3' x1' x2' x3' x1 + x2 +x3 1 x1' x2' x3 x1 + x2 +x3' 2 x1' x2 x3' x1 + x2' +x3 3 x1' x2 x3 x1 + x2' + x3' 4 x1 x2' x3' x1' + x2 + x3 5 x1 x2' x3 x1' + x2 +x3' 6 x1 x2 x3' x1' + x2' +x3 7 x1 x2 x3 x1' + x2' +x3'
Minterm & maxterm Try to look at minterm 0 and maxterm 0 x1’x2’x3’ =(x1 + x2 + x3)’ (DeMorgan’s Law) By definition, mi is complement of Mi
Peta Karnaught dengan 3 variabel f (ABC) Metode peta karnaught untuk menyederhana kan persamaan logika. Peta Karnaught dengan 2 variabel f(AB) B’ B A’ A’ B’ A’ B A A B’ A B Peta Karnaught dengan 3 variabel f (ABC) B’C’ B’C BC BC’ A’ A’B’C’ A’B’C A’BC A’BC’ A AB’C’ AB’C ABC ABC’
Lanjutan ….. c. Peta Karnaught dengan 4 variabel f(ABCD) C’D’ C’D CD
+ Lanjutan ….. d. Peta Karnaught dengan 5 variabel (ABCDE) A A’ D’E’
K-map Each square in a K-map corresponds to a minterm (and maxterm) variables are arranged in Gray code
2-variable and 3-variable K-map
Implicant Implicant is any rectangles that cover 2n minterms For 22 minterms, it can be in the form of 1 x 4 or 2 x 2 6 implicants for group of 1 minterm (red) 5 implicants for group of 2 minterms (green) 1 implicants for group of 4 minterms (blue) Total is 12 implicants
Prime Implicant (PIs) They are the largest implicant rectangle you can drawn on K-map A prime implicant is prime when there is no other implicant covers it
Essential prime implicants (EPIs) Essential minterm is the minterm covered by only 1 PI. The corresponding PI is called essential PI. For minterm 14, only red circle includes this minterm Red circle is an EPI For minterms 1,3,9, only blue circle can include them Blue circle is an EPI Green circle is not EPI, because: minterm 15, covered by both green circle and red circle, is not essential minterm 11, covered by both green circle and blue circle, is not essential
Simplification of K-map Generate all PIs Find the largest circles (group of minterms) If EPIs can cover all minterms, then it is answer. Otherwise focus on uncovered minterms, generate secondary EPIs and repeat.
Step 1 Generate PIs Blue circles are PIs They are the largest group of minterms you can find on this map
Step 2 Find EPIs Red circles are EPIs Minterm 11, 13 and 14, can only be cover by these 3 red circles
Step 3 EPIs cannot cover minterm 7 Choose between green/blue circle to cover minterm 7 Green is chosen as it is larger Less cost / literals Green – x1’x3 Blue – x1’x2x4
Final Final result is obtained x3x4’ + x2’x3 + x1’x3 + x2x3’x4
K-Map Example 1 f(A,B,C,D) = Sm(0,5,7,8,10,12,14,15) = B’C’D’ + AD’ + A’BD + BCD
K-Map Example 2 f(A,B,C,D,E) = Sm(0,2,4,7,10,12,13,18,23,26,28,29)
K-Map Example 3 f(A,B,C,D) = ∏M(0,1,2,3,6,9,14) f’ = m(0,1,2,3,6,9,14) f’ = A’B’ + B’C’D + BCD’ f = (A+B) (B+C+D’) (B’+C’+D)
K-Map Example 4 F=∑m(0,2,3,4,14,15) D=∑m(1,11,13) Don’t cares can be treated as 1’s or 0’s if it is advantageous to do so We will use blue circle (A’B’) instead of red one (A’B’C) because it contain less literals in the term
K-Map Example 5 F(A,B,C,D) = ∑m(1,3,5,7,9) + ∑d(6,12,13)
c = f(x,y,z) = (3,5,6,7) s = (1,2,4,7) c: s: y y z x c = xy+yz+xz s = x’y’z+x’yz’+xy’z’+xyz y y z x
DON’T CARE CONDITION Kondisi Don’t Care adalah suatu kondisi yang dapat diasumsikan mempunyai keadaan 0 atau 1 yang juga ditandai dengan X dan untuk menyederhanakan ekspresi boolean menggunakan peta. Contoh : Sederhanakan fungsi Boolean sbb : F(A,B,C,D) = ( 1,3,7,11,15 ) Yang mempunyai don’t care condition sbb : d(A,B,C,D) = ( 0,2,5 )
F = CD + A’B’ F = CD + A’B Jawab : C’D’ C’D CD CD’ A’B’ X 1 A’B AB AB’ AB AB’ C’D’ C’D CD CD’ A’B’ X 1 A’B AB AB’ atau F = CD + A’B’ F = CD + A’B
Don’t Care
Latihan Sederhanakan fungsi boolean berikut dengan menggunakan K-Map. F=x’yz + x’yz’ + xy’z’ + xy’z Jawab: F=x’y + xy’ Sederhanakan fungsi boolean berikut dengan menggunakan K-Map F=x’yz + xy’z’ + xyz + xyz’ Jawab: F = yz + xz’
Latihan Sederhanakan fungsi boolean berikut dengan menggunakan K-Map F=A’C + A’B + AB’C + BC Jawab: F = C + A’B F=∑(0,2,4,5,6) Jawab: F=z’ + xy’
Latihan Sederhanakan fungsi boolean berikut dengan menggunakan K-Map F(w,x,y,z)=∑(0,1,2,4,5,6,8,9,12,13,14) Jawab: F(w,x,y,z)=y’+w’z’+xz’ F=A’B’C’+B’CD’+A’BCD’+AB’C’ Jawab: F=B’D’+B’C’+A’CD’
Latihan Sederhanakan fungsi boolean berikut dengan menggunakan K-Map F(A,B,C,D,E)=∑(0,2,4,6,9,11,13,15,17,21,25,27,29,31) Jawab: F=BE+AD’E+A’B’E’