1 / 59

bab2a-1-09

QWERTYUIOPPOIIUY

Riskia
Download Presentation

bab2a-1-09

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logic and Computer Design Fundamental Chapter 2 Rangkaian Logika Kombinasi Bagian 1 : Rangkaian Gerbang dan Persamaan Boolean M. Mano & Charles R. Kime 2008, Pearson Education, Inc

  2. Overview • Bagian 1 – Rangkaian Gerbang dan Persamaan Boolean. • Logika Biner dan Gerbang • Aljabar Boolean • Standard Forms • Bagian 2 – Optimasi Rangkaian • Optimasi 2 – level • Manipulasi Peta • Optimasi Praktis (Espresso) • Optimasi Rangkaian Multi-Level • Bagian 3 – Gerbang2 tambahan dan rangkaian • Tipe2 gerbang yang lain • Operator Exclusive-OR dan Gerbang • Outputs High-Impedance

  3. Logika Biner dan Gerbang • Variabel Biner : salah satu dari 2 nilai • Operator Logika : Beroperasi pada nilai biner dan variabel biner. • Dasar operator logika adalah merupakan fungsi logika AND, OR and NOT. • Gerbang Logika mengimplementasikan fungsi logika • Aljabar Boolean : Suatu sistem matematika yang sangat berguna untuk menspesifikasikan dan mentransformasikan fungsi • Aljabar Boolean dipakai sebagai dasar untuk mendesain dan menganalisa sistem digital.

  4. Variabel Biner. • Dua nilai biner disebut dengan beberapa nama berbeda: • True/False • On/Off • Yes/No • 1/0 • Digunakan 1 dan 0 untuk menyatakan 2 nilai. • ContohVariable identifier : • A, B, y, z, or X1 • RESET, START_IT, atau ADD1 (y.a.d)

  5. Operasi Logikal • Tiga dasar operasi logikal adalah: • AND • OR • NOT • AND dinyatakan dengan titik (·). • OR dinyatakan dengan tambah (+). • NOT dinyatakan dengan overbar ( ¯ ), single quote mark (') sesudah, atau (~) sebelum variabel.

  6. Contoh: = z x y + = X A • Contoh: • dibaca “Y adalah : A AND B.” • dibaca “z adalah : x OR y.” • dibaca “X adalah : NOT A.” = × Y A B • Catatan: Pernyataan: • 1 + 1 = 2 (dibaca “one plus one equals two”) tidak sama dengan : • 1 + 1 = 1 (read “1 or 1 equals 1”).

  7. AND Definisi Operator 0 · 0 = 0 0 · 1 = 0 NOT OR 1 · 0 = 0 1 + 1 = 1 0 + 0 = 0 = 0 1 1 · 1 = 1 0 + 1 = 1 = 1 0 1 + 0 = 1 • Operasi penerapan untuk nilai • "0" and "1" untuk masing2 operator :

  8. Truth Tables/Tabel Kebenaran AND NOT X Y Z = X·Y X = Z X 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 1 • Truth table- Suatu daftar tabular dari nilai suatu fungsi untuk semua kemungkinan kombinasi. • Contoh: Truth tables untuk operasi dasar :

  9. Implementasi Fungsi Logika. Switches in parallel => OR Switches in series => AND Normally-closed switch => NOT C • MenggunakanSwitch • Untuk inputs: • logic 1 is switch closed • logic 0 is switch open • Untuk outputs: • logic 1 is light on • logic 0 is light off. • NOT menggunakan switch seperti: • logic 1 is switch open • logic 0 is switch closed

  10. Implementasi Fungsi Logika. (Continued) A C D • Contoh: Logic Using Switches • Lampu nyala (L = 1) untuk: L(A, B, C, D) = L (A, B, C, D) = A ((B C') + D) = A B C' + A D Dan bila tidak, mati (L = 0). • Model yang berguna untuk rangk relay dan untuk rangk gerbang CMOS , merupakan dasar dari teknologi logika digital saat ini. B

  11. Gerbang Logika(Logic Gates) • Pada awal komputer, switches terbuka dan tertutup menggunakan medan magnit yang dihasilkan oleh energi dari koil pada relays. Switches secara bergantian membuka dan menutup jalan arus. • Kemudian, vacuum tubes membuka dan menutup jalan arus secara elektronik, menggantikan relays. • Saat ini, transistors dipakai sebagai electronic switches yang membuka dan menutup jalannya arus. • Optional: Chapter 6 – Part 1: The Design Space

  12. Simbol Gerbang Logika dan perilakunya. • Gerbang Logika mempunyai simbol khusus, • And waveform behavior in time as follows: = = = +

  13. Delay pada Gerbang . • Secara aktual, physical gates, bila satu atau lebih input berubah menyebabkan output berubah, perubahan tersebut tidak terjadi secara instan. • Delay antara perubahan input dan perubahan hasil output adalah gate delay dinyatakan : tG 1 Input 0 tG tG = 0.3 ns tG 1 Output 0 Time (ns) 0 1.5 1 0.5

  14. Diagram Logika dan Ekspresi-nya. Tabel Kebenaran Persamaan: = X Y Z × + F X Z Y = + F X Y Z 0 0 0 0 0 0 1 1 Diagram Logika 0 1 0 0 X 0 1 1 0 1 0 0 1 F Y 1 0 1 1 1 1 0 1 Z 1 1 1 1 • Persamaan Boolean, tabel kebenaran dan Diagram Logika mentayakan Fungsi yang sama! • Tabel Kebenaran adalah unik; ekspresi dan diagram logika tidak. Ini memberikan fleksibilitas dalam implementasi fungsi.

  15. Evaluasi Fungsi Boolean = F1 xy z = + F2 x y z = + + F3 x y z x y z x y = + F4 x y x z

  16. Aljabar Boolean + 0 X X = 1. 2. . 1 X X = 3. 1 1 4. . 0 0 X X + = = 5. 6. X + X X X . X X = = 7. 1 8. 0 X + X X . X = = 9. X = X 10. 11. XY YX = Commutative = X + Y Y + X Associative 12. 13. (XY) Z X(Y Z) = (X + Y) Z X + (Y Z) + = + X(Y + Z) XY XZ = + Distributive 14. 15. X + YZ = (X + Y) (X + Z) De Morgan ’ s 16. 17. X + Y X . Y X . Y X + Y = = • Struktur Aljabar didefinisikan pada satu set atau minimum 2 elemen, A, B, dengan tiga operator biner (denoted +, · and ) yang dirumuskan secara mendasar sbb: 1-4 :Existence of 0 and 1 5-6 :Idempotence 7-8 :Existence of complement 9 :Involution

  17. Beberapa properti dari identitas dan Aljabar. • “Dual” dari ekspresi suatu ekspresi aljabar didapat dengan menggantikan + and ·dan menggantikan 0’s dan 1’s. • Unless it happens to be self-dual, the dual of an expression does not equal the expression itself. • Example: F = (A + C)· B + 0 dual F = (A · C + B) · 1 = A · C + B • Example: G = X · Y + (W + Z) dual G = • Example: H = A · B + A · C + B · C • dual H = (A + B)(A + C)(B + C). Using the Boolean identities, • = (A +BC) (B+C) = AB + AC + BC. So H is self-dual. • Are any of these functions self-dual?

  18. Beberapa properti dari identitas dan Aljabar. (Continued) • Kemungkinan dapat lebih dari 2 elemen in B, yaitu elemen selain1 and 0. Umumnya disebut apa Aljabar Boolean dengan lebih dari 2 elemen? • Bila B terdiri hanya 1 dan 0, maka B disebut switching algebra yang merupakan aljabar yang sering digunakan. Algebra of Sets Algebra of n-bit binary vectors

  19. Operator Boolean 1. Parentheses/kurung 2. NOT 3. AND 4. OR • Urutan Evaluasi pada Ekspresi Boolean adalah : • Akibatnya: Kurung muncul sekitar • ekspresi OR • Contoh : F = A(B + C)(C + D)

  20. Contoh 1: Pembuktian Aljabar Boolean • A + A·B = A (Absorption Theorem) Proof Steps Justification (identity or theorem) A + A·B = A · 1 + A · B X = X · 1 = A · ( 1 + B) X · Y + X · Z = X ·(Y + Z)(Distributive Law) = A · 11 + X = 1 = A X · 1 = X • Alasan melakukan pembuktian untuk mempelajari: • Ber-hati2 dan secara efisien menggunakan rumus dan teorema Aljabar Boolean. • Bagaimana memilih identitas dan teorema yang cocok untuk diterapkan, untuk melanjutkan penyelesaian berikutnya.

  21. Contoh 2: Pembuktian Aljabar Boolean • AB + AC + BC = AB + AC (Consensus Theorem) Proof Steps Justification (identity or theorem) AB + AC + BC = AB + AC + 1 · BC ? = AB +AC + (A + A) · BC ? = (lanjutkan!)

  22. Contoh 3: Pembuktian Aljabar Boolean + + = + ( X Y ) Z X Y Y ( X Z ) + + ( X Y ) Z X Y Proof Steps Justification (identity or theorem) = (lanjutkan!)

  23. Teorema yang berguna. ( ) ( ) + = + + = x x × x y y y x y y y M inimizatio n × ( ) + = + + = x x y x y x y x y Simplifica tion × × x × + + = + × × x y x z y z x y x z Consensus × × × ( ) ( ) ( ) ( ) ( ) + × + × + = + × + x y x z y z x y x z + = × × = + x y x y x y x y DeMorgan' s Laws

  24. Pembuktian dengan penyederhanaan. ( ) ( ) × + × = + + = x y x y y x y x y y

  25. Proof of DeMorgan’s Laws = × × = x y x y x y x y + +

  26. Evaluasi Fungsi Boolean = F1 xy z = + F2 x y z = + + F3 x y z x y z x y = + F4 x y x z

  27. Penyederhanan Ekspresi + + + + A B A C D A B D A C D A B C D • Suatu Penerapan Aljabar Boolean • Sederhanakan agar didapat jumlah literal terkecil. (variabel complemen dan tidak complemen): =AB + ABCD + A C D + A C D + A B D = AB + AB(CD) + A C (D + D) + A B D = AB + A C + A B D = B(A + AD) +AC = B (A + D) + A C 5 literals

  28. Fungsi Complemen + x y z y z x • GunakanTeoremaDeMorgan'suntukmengkomplemen-kanfungsi: 1. Salingditukar operators AND dan OR • Komplemen-kan masing2 nilaikonstan dan literal. • Contoh:Komplemen-kanF = F = (x + y + z)(x + y + z) • Contoh:Komplemen-kan G = (a + bc)d + e G = ((a (b' + c'))+ d ) e' = (a (b' + c') + d) e'

  29. Overview Bentuk Fungsi Kanonik • Apa itu Bentuk Kanonik? • Minterms and Maxterms • Index Merepresentasikan Minterms dan Maxterms • Representasi Sum-of-Minterm (SOM) • Representasi Product-of-Maxterm (POM) • Representasi Fungsi Komplemen • Konversi antar Representasi

  30. Bentuk Kanonik • Sangat berguna untuk menspecify Fungsi Boolean dalam bentuk seperti: • Allows comparison for equality. • Has a correspondence to the truth tables • Bentuk Kanonik yang umum digunakan : • Sum of Minterms (SOM) = Sum of Product (SOP) • Product of Maxterms (POM)= Product of Sum (POS)

  31. Minterms XY X Y X Y • Minterms adalah AND terms dengan adanya setiap variabel baik itu ‘true’ atau bentuk komplemen form. • Diketahui masing2 variabel biner adalah normal (e.g., x) atau komplemen (e.g., ), maka ada 2n minterms untuk n variable. • Contoh: Dua variable (X and Y) akan didapat • 2 x 2 = 4 kombinasi: (both normal) (X normal, Y complemented) (X complemented, Y normal) (both complemented) • Berarti ada empat minterms dari dua variabel. x X Y

  32. Maxterms + X Y + X Y + X Y + X Y • Maxterms adalah OR terms dengan setiap variable ‘true’ atau bentuk complemen . • Diketahui masing2 variabel biner adalah normal (e.g., x) atau komplemen (e.g., x), maka ada 2n maxterms untuk n variable. • Contoh: Dua variable (X and Y) menghasilkan2 x 2 = 4 kombinasi: (both normal) (x normal, y complemented) (x complemented, y normal) (both complemented)

  33. Maxterms and Minterms • Contoh: Dua variable minterms dan maxterms. • Indeks diatas sangat penting untuk menentukan variabel yang mana dalam terms tersebut ‘true’ dan yang mana komplemen.

  34. Urutan Standard. • Minterms dan maxterms didisain dengan subscript • Subscript adalah angka , tergantung pada binary pattern-nya • Bit pada pattern menyatakan komplemen atau kondisi normal untuk masing2 variable yang ditulis dalam urutan standard. • Semua variabel akan ada dalam minterm atau maxterm dan akan ditulis dalam urutan yang sama (umumnya alphabetically) • Contoh: Untuk variable a, b, c: • Maxterms: (a + b + c), (a + b + c) • Terms: (b + a + c), a c b, dan (c + b + a) TIDAK dalam urutan standard. • Minterms: a b c, a b c, ab c • Terms: (a + c), b c, and (a + b) tidak terdiri dari semua variables

  35. Tujuan dari Index • Index untuk minterm atau maxterm, menyatakan sebagai bil biner, yang dipakai untuk menentukan apakah variable yang ada bentuk ‘true’ atau bentuk komplemen. • Untuk Minterms: • “1” berarti var ini “Bukan komplemen” dan • “0” berarti var ini “Komplemen”. • Untuk Maxterms: • “0” berarti var ini “Bukan komplemen” dan • “1” berarti var ini “Komplemen”.

  36. Contoh Index untuk Tiga Variabel X , Y , Z X Y Z • Contoh: (Untuk tiga variabel) • Misalkan Variabel tersebut adalah : X, Y, and Z. • Urutan standard-nya adalah : X, then Y, then Z. • Index 0 (basis 10) = 000 (basis 2) untuk tiga variables). Ketiga var tersebut adalah komplemen utk minterm 0 () dan tidak ada var yang komplemen untuk Maxterm 0 (X,Y,Z). • Minterm 0, disebut m0 = . • Maxterm 0, disebut M0 = (X + Y + Z). • Minterm 6 ? • Maxterm 6 ?

  37. Contoh Indeks– Empat Variable. Index Binary Minterm Maxterm i Pattern mi Mi 0 0000 1 0001 3 0011 5 0101 7 0111 10 1010 13 1101 15 1111 a b c d ? a b c d + + + ? a b c d + + + a b c d a b c d + + + ? a b c d + + + a b c d a b c d ? a b c d + + + a b c d

  38. Hubungan Minterm and Maxterm = m M = M m i i i i • Mengulangi: DeMorgan's Theorem and • Contoh Dua Variabel: dan Jadi M2 adalah komplemen dari m2 dan sebaliknya. • Bila DeMorgan's Theorem terdiri dari n variabel, maka term diatas juga terdiri dari n variabel. • Bila : dan Maka Mi adalah komplemen dari mi. + = × = + x y x y x · y x y = = + m x· y M x y 2 2

  39. Tabel Fungsi ke-dua2-nya. x y m m m m x y M M M M 0 1 2 3 0 1 2 3 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 0 • Minterms dari Maxterms dari 2 variabel 2 variabel • Masing2 kolom pada tabel fungsi maxterm adalah komplemen dari kolom tabel fungsi minterm, maka Mi adalah komplemen dari mi.

  40. Observasi • Pada Tabel fungsi: • Masing2 minterm mempunyai satu dan hanya satu, 1 berada pada 2n terms ( minimum dari 1s). Selain itu adalah 0. • Masing2 maxterm mempunyai satu dan hanya satu, 0 berada pada 2n terms ( maximum of 0s). Selain itu adalah 1. • Kita dapat mengimplementasikan dengan "ORing" minterms dengan memasukkan "1" kedalam tabel fungsi. Ini disebut Fungsi dari minterm. • Kita dapat mengimplementasikan dengan "ANDing" maxterms dengan memasukkan "0" kedalam tabel fungsi. Ini disebut Fungsi dari maxterm. • Jadi ada dua bentuk kanonik: • Sum of Minterms (SOM) – Jumlah sukumin • Product of Maxterms (POM) – Hasil kali sukumax untuk menyatakan Fungsi Boolean.

  41. Contoh Fungsi Minterm x y z index m1 + m4 + m7 = F1 0 0 0 0 0 + 0 + 0 = 0 0 0 1 1 1 + 0 + 0 = 1 0 1 0 2 0 + 0 + 0 = 0 0 1 1 3 0 + 0 + 0 = 0 1 0 0 4 0 + 1 + 0 = 1 1 0 1 5 0 + 0 + 0 = 0 1 1 0 6 0 + 0 + 0 = 0 1 1 1 7 0 + 0 + 1 = 1 • Example: Find F1 = m1 + m4 + m7 • F1 = xy z + x y z + x y z

  42. Contoh Fungsi Minterm • F(A, B, C, D, E) = m2 + m9 + m17 + m23 • F(A, B, C, D, E) = A’B’C’DE’ + A’BC’D’E + AB’C’D’E + AB’CDE

  43. Contoh Fungsi Maxterm = + + + + + + F (x y z) ·(x y z)·(x y z ) 1 + + + + ·( x y z )·( x y z)     x y z i = F1 M0 M2 M3 M5 M6     0 0 0 0 = 0 0 1 1 1 1     0 0 1 1 = 1 1 1 1 1 1     0 1 0 2 = 0 1 0 1 1 1     0 1 1 3 = 0 1 1 0 1 1     1 0 0 4 = 1 1 1 1 1 1     1 0 1 5 = 0 1 1 1 0 1     1 1 0 6 = 0 1 1 1 1 0     1 1 1 7 = 1 1 1 1 1 1 • Contoh: Implementasikan F1 dalam maxterms: F1 = M0· M2· M3· M5 · M6

  44. Contoh Fungsi Maxterm = × × × F ( A , B , C , D ) M M M M 3 8 11 14 • F(A, B,C,D) = (A + B + C’ + D’) (A’ + B + C + D) (A’ + B + C’ + D’) (A’ + B’ + C’ + D)

  45. Kanonikal Jumlah dari Minterms + v v = + f x x y • Setiap fungsi Boolean dapat dinyatakan dalam : Sum of Minterms. • For the function table, the minterms used are the terms corresponding to the 1's • For expressions, expand all terms first to explicitly list all minterms. Do this by “ANDing” any term missing a variable v with a term ( ). • Example: Implement as a sum of minterms. First expand terms: Then distribute terms: Express as sum of minterms: f = m3 + m2 + m0 = + + f x ( y y ) x y = + + f xy x y x y

  46. Another SOM Example = + F A B C • Example: • There are three variables, A, B, and C which we take to be the standard order. • Expanding the terms with missing variables: • Collect terms (removing all but one of duplicate terms): • Express as SOM:

  47. Shorthand SOM Form = + F A B C • From the previous example, we started with: • We ended up with: F = m1+m4+m5+m6+m7 • This can be denoted in the formal shorthand: • Note that we explicitly show the standard variables in order and drop the “m” designators.

  48. Canonical Product of Maxterms × v v = + f ( x , y , z ) x x y + = + + = × + = + x x y (x x )(x y ) 1 (x y ) x y + + = + + + + ) ( x y z z ( x y z ) x y z × • Any Boolean Function can be expressed as a Product of Maxterms (POM). • For the function table, the maxterms used are the terms corresponding to the 0's. • For an expression, expand all terms first to explicitly list all maxterms. Do this by first applying the second distributive law , “ORing” terms missing variable v with a term equal to and then applying the distributive law again. • Example: Convert to product of maxterms: Apply the distributive law: Add missing variable z: Express as POM: f = M2 · M3

  49. Another POM Example = + = x (A C B C), y A = z B = + + + + f ( C B A )(A C B ) • Convert to Product of Maxterms: • Use x + y z = (x+y)·(x+z) with , and to get: • Then use to get: and a second time to get: • Rearrange to standard order, to give f = M5· M2 = + + f(A, B, C) A C B C A B = + + + + f (A C B C A )(A C B C B ) + = + x x y x y = + + + + f ( C BC A )(A C C B ) = + + + + f ( A B C )(A B C)

  50. Function Complements F ( x , y , z ) = S ( 1 , 3 , 5 , 7 ) m • The complement of a function expressed as a sum of minterms is constructed by selecting the minterms missing in the sum-of-minterms canonical forms. • Alternatively, the complement of a function expressed by a Sum of Minterms form is simply the Product of Maxterms with the same indices. • Example: Given = S ( x , y , z ) ( 0 , 2 , 4 , 6 ) F m = P F ( x , y , z ) ( 1 , 3 , 5 , 7 ) M

More Related