Materi | Catatan Kuliah
Logic and Computer Design Fundamental
h
Chapter 2
Rangkaian Logika Kombinasi
Rangkaian Logika Kombinasi
Bagian 1 : Rangkaian Gerbang dan
P
B
l
Persamaan Boolean
M M
& Ch l
R Ki
M. Mano & Charles R. Kime
2008, Pearson Education, Inc
,
,
1
Overview
Overview
Bagian 1 – Rangkaian Gerbang dan Persamaan Boolean.
• Logika Biner dan Gerbang
• Aljabar Boolean
• Aljabar Boolean
• Standard Forms
Bagian 2 – Optimasi Rangkaian
• Optimasi 2 – level
• Manipulasi Peta
• Optimasi Praktis (Espresso)
• Optimasi Praktis (Espresso)
• Optimasi Rangkaian Multi-Level
Bagian 3 – Gerbang2 tambahan dan rangkaiang g g
• Tipe2 gerbang yang lain
• Operator Exclusive-OR dan Gerbang Outputs High Impedance
Chapter 2 - Part 1 2
• Outputs High-Impedance
Logika Biner dan Gerbang
Logika Biner dan Gerbang
Variabel Biner : salah satu dari 2 nilaiVariabel 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.
Chapter 2 - Part 1 3
Variabel Biner.
Dua nilai biner disebut dengan beberapa namaDua nilai biner disebut dengan beberapa nama berbeda:
• True/FalseTrue/False
• On/Off
• Yes/No
• Yes/No
• 1/0
Di k 1 d 0 t k t k 2 il i
Digunakan 1 dan 0 untuk menyatakan 2 nilai.
ContohVariable identifier :
• A, B, y, z, or X1
• RESET, START_IT, atau ADD1 (y.a.d)
(2)
Operasi Logikal
Operasi Logikal
Tiga dasar operasi logikal adalah:
Tiga dasar operasi logikal adalah:
• ANDOR
• OR
• NOT
AND dinyatakan dengan titik (·).
OR dinyatakan dengan tambah (+)
OR dinyatakan dengan tambah (+).
NOT dinyatakan dengan overbar ( ¯ ),
single quote mark (') sesudah, atau (~)
sebelum variabel.
Chapter 2 - Part 1 5
sebelum variabel.
Contoh:
Contoh:
Contoh:
• dibaca “Y adalah : A AND B.”
i “ O ”
=A B
Y ⋅
• dibaca “z adalah : x OR y.”
• dibaca “X adalah : NOT A.” y
x z= +
A X=
Catatan: Pernyataan:
1 + 1 2 (dib “ l l t ”)
1 + 1 = 2 (dibaca “one plus one equals two”)
tidak sama dengan :
g
1 + 1 = 1 (read “1 or 1 equals 1”).
Chapter 2 - Part 1 6
Definisi Operator
e
s Ope
o
Operasi penerapan untuk nilai
Operasi penerapan untuk nilai
"0" and "1" untuk masing2 operator : AND
0 0
0
OR
0
0
0
NOT
0 · 0 = 0
0 · 1 = 0
0 + 0 = 0
0 + 1 = 1
1
0
=
0
1
=
1 · 0 = 0
1 1
1
1 + 0 = 1
1 + 1
1
0
1
1 · 1 = 1
1 + 1 = 1
Truth Tables/Tabel Kebenaran
Truth table−Suatu daftar tabular dari nilai suatu fungsi untuk semua kemungkinan kombinasi.
Contoh: Truth tables untuk operasi dasar : NOT
AND OR
1 0
X NOT
X
Z
=
0 0
0
Z = X·Y Y
X
AND OR
X Y Z = X+Y
0 0 0
0 1
1 0
0 1
0
0 0
0 0 0 0
0 1 1
1 1
1
0 0
1 1 0 1
1 1 1
1 1
(3)
Implementasi Fungsi Logika.
MenggunakanSwitch
gg
Switches in parallel => OR• Untuk inputs:
logic 1 is switch closedlogic 1 is switch closed
logic 0 is switch open
• Untuk outputs:Untuk outputs: Switches in series => AND
logic 1 is light on
logic 0 is light off.
Switches in series => AND
g g
• NOT menggunakan switch
seperti: Normally-closed switch => NOT seperti:
logic 1 is switch open
logic 0 is switch closed
C
Chapter 2 - Part 1 9
og c 0 s sw tc c osed
Implementasi Fungsi Logika.
(Continued)
Contoh: Logic Using Switches
B B A
C
D Lampu nyala (L = 1) untuk:
D
L(A, B, C, D) =
Dan bila tidak, mati (L = 0).
Model yang berguna untuk rangk relay dan untuk rangk gerbang CMOS , merupakan
Chapter 2 - Part 1 10
dasar dari teknologi logika digital saat ini.
Gerbang Logika(Logic Gates)
Pada awal komputer, switches terbuka dan tertutup menggunakan medan magnit yang dihasilkan oleh gg g y g energi dari koil pada relays. Switches secara bergantian membuka dan menutup jalan arus.
Kemudian, vacuum tubesmembuka dan menutup jalan arus secara elektronik, menggantikan relays.
S i i i di k i b i l i i h
Saat ini, transistorsdipakai sebagai electronic switches yang membuka dan menutup jalannya arus.
O ti l Ch t 6 P t 1 Th D i S
Optional: Chapter 6 – Part 1: The Design Space
Chapter 2 - Part 1 11
Simbol Gerbang Logika dan
perilakunya
X
perilakunya.
Gerbang Logika mempunyai simbol khusus,
OR gate X
Y Z 5 X 1 Y X
Y Z 5 X
· Y
AND gate
X Z 5 X
NOT gate or inverter (a) Graphic symbols
inverter
And waveform behavior in time as follows:
X 0 0 1 1
Y 0 1 0 1
X· Y
(AND) 0 0 0 1
X 1 Y
(OR) 0 1 1 1
Chapter 2 - Part 1 12 (b) Timing diagram
(4)
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 y p p p hasil output adalah gate delaydinyatakan : tG
1
tG tG
Input 0 1
tG= 0.3 ns
tG G
Output 0
1 G
Chapter 2 - Part 1 13
Time (ns) 0 0.5 1 1.5
Diagram Logika dan Ekspresi-nya.
Persamaan: Tabel Kebenaran
X Y Z F = X + Y Z
Z
Y
X
F
=
+
1 0 0 1
0 0 0 0
X Y Z F = X + Y ⋅ Z
X
Diagram Logika
0 0 1 1
0 0 1 0
1 0 0 1
Y F
1 1 1 0
1 1 0 1
1 1 0 0
Persamaan Boolean tabel kebenaran dan Diagram Logika
Z 1
1 1 1
1 1 1 0
Persamaan Boolean, tabel kebenaran dan Diagram Logika mentayakan Fungsi yang sama!
Tabel Kebenaran adalah unik; ekspresi dan diagram logika id k I i b ik fl k ibili d l i l i
Chapter 2 - Part 1 14
tidak. Ini memberikan fleksibilitas dalam implementasi fungsi.
Aljabar Boolean
Aljabar Boolean
Struktur Aljabar didefinisikan pada satu set atau minimum 2 elemen, B, dengan tiga operator biner (denoted +, · and ) yang dirumuskan secara mendasar sbb:
1. 3. 5
2. 4. 6
X .1=X
X .0=0
X X X
X + 0=X
+
X 1=1
X + X X 5.
7. 9
6. 8.
X . X =X 0 =
X . X
X + X=X
1 =
X + X X=X 9.
11. 13.
Commutative Associative 10.
12.
X + Y=Y + X
(X + Y)+Z= X +(Y +Z)
XY =YX
(XY)Z =X(Y Z)
X X
15. 17.
Distributive DeMorgan’s 14.
16.
(X Y)+Z X (Y +Z)
X(Y + Z) =XY XZ+
X + Y =X . Y
( ) ( )
X + YZ=(X + Y) (X + Z)
X . Y=X +Y
Beberapa properti dari identitas dan Aljabar.
If the meaning is unambiguous, we leave out the symbol “·”
p p
p
j
The identities above are organized into pairs. These pairs have names as follows:
1-4 Existence of 0 and 1 5-6 Idempotence 7-8 Existence of complement 9 Involution
10-11 Commutative Laws 12-13 Associative Laws 14-15 Distributive Laws 16-17 DeMorgan’s Laws
“Dual” dari ekspresi suatu ekspresi aljabar didapat dengan menggantikan + and · dan menggantikan 0’s dan de ga e gga t a a d da e gga t a 0 s da 1’s.
(5)
Beberapa properti dari identitas dan Aljabar.
(Continued)
(Continued)
Contoh : F = (A + C)· B + 0
dual F = (A·C + B)·1=A·C + B dual F (A C + B) 1 A C + B
Contoh : G = X ·Y + (W + Z) d l G
dual G =
Contoh : H = A ·B + A · C + B · C dual H =
Are any of these functions self-dual?Are any of these functions self dual?
Chapter 2 - Part 1 17
Beberapa properti dari identitas dan Aljabar.
(Continued)
Kemungkinan dapat lebih dari 2 elemen in B,
(Continued)
yaitu elemen selain1 and 0. Umumnya disebut apa Aljabar Boolean dengan lebih dari 2 elemen?
Algebra of Setsg
Algebra of n-bit binary vectors
Bika B terdiri hanya 1 dan 0, maka B disebut switching algebra yang merupakan aljabar switching algebra yang merupakan aljabar yang sering digunakan.
Chapter 2 - Part 1 18
Operator Boolean
Ope
o
oo e
Urutan Evaluasi pada Ekspresi Boolean
Urutan Evaluasi pada Ekspresi Boolean
adalah :
1
P
th
/k
1. Parentheses/kurung
2. NOT
3
AND
3. AND
4. OR
Akibatnya: Kurung muncul sekitar
ekspresi OR
ekspresi OR
Contoh :
F = A(B + C)(C + D)
Chapter 2 - Part 1 19
Contoh 1: Pembuktian Aljabar Boolean
j
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 · 1 1 + X = 1
= A X · 1 = X
Alasan melakukan pembuktian untuk mempelajari:
• Ber hati2 dan secara efisien menggunakan rumus dan teorema
• Ber-hati2 dan secara efisien menggunakan rumus dan teorema Aljabar Boolean.
• Bagaimana memilih identitas dan teorema yang cocok untuk diterapkan untuk melanjutkan penyelesaian berikutnya
Chapter 2 - Part 1 20
(6)
Contoh 2: Pembuktian Aljabar Boolean
AB + AC + BC = AB + AC (Consensus Theorem)
j
Proof Steps Justification (identity or theorem) AB + AC + BC
AB AC BC
= AB + AC + 1 · BC ? = AB +AC + (A + A) · BC ? = AB +AC + (A + A) · BC ?
= (lanjutkan!)
Chapter 2 - Part 1 21
Contoh 3: Pembuktian Aljabar Boolean
j
(X+Y)Z+XY= Y(X+Z)
Proof Steps Justification (identity or theorem) Y
X Z ) Y X
( + +
) (
) (
= (lanjutkan!)
Y X Z ) Y X (
Chapter 2 - Part 1 22
Teorema yang berguna.
eo e
y
g be gu
.
(
+)
(
+)
= Mi i i ti =+x x
(
x y)
(
y)
y Minimization yy y
x⋅ ⋅ = + + =
(
x y)
x Absorption xx y x
x+ ⋅ = ⋅ + =
+x x
x+ ⋅y =x+y x⋅(
+y)
= x⋅y Simplification Consensus zy x z y z y
x + + = +
x x
x x
x⋅y+ ⋅z+y⋅z =x⋅y+ ⋅z Consensus(
x+y)
⋅(
+z)
⋅(
y+z) (
= x+y)
⋅(
+z)
x x
x x
x y⋅ y
x+ = x⋅y = +x y DeMorgan'sLawsPembuktian dengan penyederhanaan.
g
p
y
(
x
y
)
(
y
)
y
y
y
y
x
⋅
y
+
x
⋅
y
=
y
(
x
+
y
)
(
x
+
y
)
=
y
x
⋅
+
x
⋅
=
+
x
+
=
(7)
Proof of DeMorgan’s Laws
oo o
e
o g
s
ws
+
y
x
+
y
=
x
y
x
y
=
x
+
y
x
=
x
⋅
y
x
⋅
y
=
x
+
y
Chapter 2 - Part 1 25
Evaluasi Fungsi Boolean
x y z F1 F2 F3 F4
xy
F1
=
z
y0 0 0 0 0
0 0 1 0 1
x
z
y
x
z
y
x
F3
x
F2
y
+
=
=
+
yz
y
+
0 0 1 0 10 1 0 0 0
0 1 1 0 0
z
x
y
x
F4
x
z
y
x
z
y
x
F3
+
=
y
0 1 1 0 0
1 0 0 0 1
1 0 1 0 1
1 0 1 0 1
1 1 0 1 1
1 1 1 0 1
Chapter 2 - Part 1 26
Penyederhanan Ekspresi
e yede
sp es
Suatu Penerapan Aljabar Boolean
p
j
Sederhanakan agar didapat jumlah
literal terkecil (variabel complemen dan
literal terkecil. (variabel complemen dan
tidak complemen):
= AB + ABCD + A C D + A C D + A B D
+
+
+
+
A
C
D
A
B
D
A
C
D
A
B
C
D
B
A
= 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
Chapter 2 - Part 1 27
= B (A + D) + A C
5 literals
Fungsi Complemen
Gunakan Teorema DeMorgan's untuk
Gunakan Teorema DeMorgan s untuk
mengkomplemen-kan fungsi:
1 S li
dit k
t
AND d
OR
1. Saling ditukar operators AND dan OR
2.
Komplemen-kan masing2 nilai konstan
dan literal.
Contoh:Komplemen kan
F =
x
y
z
+
x
y
z
Contoh:Komplemen-kan
F =
F = (x + y + z)(x + y + z)
x
+
y
z
z
y
x
(
y
)(
y
)
Contoh:Komplemen-kan
G = (a + bc)d + e
Chapter 2 - Part 1 28
(8)
Overview
Bentuk Fungsi Kanonik
Bentuk Fungsi Kanonik
A
it B
t k K
ik?
Apa itu Bentuk Kanonik?
Minterms and Maxterms
Index Merepresentasikan Minterms dan
Maxterms
Maxterms
Representasi Sum-of-Minterm (SOM)
Representasi Product-of-Maxterm (POM)
R
t
i F
i K
l
Representasi Fungsi Komplemen
Konversi antar Representasi
Chapter 2 - Part 1 29
p
Bentuk Kanonik
e
u
o
Sangat berg na nt k menspecif F ngsi
Sangat berguna untuk menspecify Fungsi
Boolean dalam bentuk seperti:
• Allows comparison for equality.
• Has a correspondence to the truth tables Has a correspondence to the truth tables
Bentuk Kanonik yang umum digunakan :
S f i (SO ) S f
• Sum of Minterms (SOM) = Sum of Product (SOP)
• Product of Maxterms (POM)= Product of Sum (POS)
Chapter 2 - Part 1 30
Minterms
Minterms adalah AND terms dengan adanya setiap variabel baik itu ‘true’ atau bentuk setiap variabel baik itu true atau bentuk komplemen form.
Diketahui masing2 variabel biner adalah normal
Diketahui masing2 variabel biner adalah normal (e.g., x) atau komplemen (e.g., ), maka ada 2n
minterms untukn variable.
x
minterms untuk n variable.
Contoh: Dua variable (X and Y) akan didapat
2 x 2 = 4 kombinasi:
2 x 2 = 4 kombinasi: (both normal)
(X normal, Y complemented)
Y
X
XY
(X normal, Y complemented) (X complemented, Y normal) (both complemented)
Y
X
Y
X
Y
X
( p ) Berarti ada empat minterms dari dua variabel.
X
Y
Maxterms
Maxterms adalah OR terms dengan setiap g p variable ‘true’ atau bentuk complemen .
Diketahui masing2 variabel biner adalah g
normal (e.g., x) atau komplemen (e.g., x), maka ada 2nmaxterms untuk nvariable.
Contoh: Dua variable (X and Y) menghasilkan 2 x 2 = 4 kombinasi:
(both normal)
(x normal, y complemented)
Y
X
+
Y
X
+
( y p )(x complemented, y normal) (both complemented)
Y
X
Y
X
+
Y
X
+
Y
(both complemented)X
+
(9)
Maxterms and Minterms
Contoh: Dua variable minterms dan
maxterms.
Index Minterm Maxterm Index Minterm Maxterm
0 x y x + y
1 x y x + y
2 x y x + y
2 x y x + y
3 x y x + y
Indeks diatas sangat penting untuk
menentukan variabel yang mana dalam terms
Chapter 2 - Part 1 33
menentukan variabel yang mana dalam terms tersebut ‘true’ dan yang mana komplemen.
Urutan Standard.
Minterms dan maxterms didisain dengan subscript
S b i t d l h k t t d bi tt
Subscript adalah angka , tergantung pada binary pattern-nya
Bit pada pattern menyatakan komplemen atau kondisi normal untuk masing2 variable yang ditulis dalam urutan 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:
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 dalamTerms: (b + a + c), a c b, dan (c + b + a) TIDAK dalam urutan standard.
• Minterms: a b c, a b c, a b c
Chapter 2 - Part 1 34
• Terms: (a + c), b c, and (a + b) tidak terdiri dari semua variables
Tujuan dari Index
Index untuk minterm atau maxterm, ,
menyatakan sebagai bil biner, yang dipakai untuk menentukan apakah variable yang ada p y g bentuk ‘true’ atau bentuk komplemen.
Untuk Minterms:Untuk Minterms:
• “1” berarti var ini “Bukan komplemen” dan
• “0” berarti var ini “Komplemen”
• 0 berarti var ini Komplemen .
Untuk Maxterms:
“0” b i i i “B k k l ” d
• “0” berarti var ini “Bukan komplemen” dan
• “1” berarti var ini “Komplemen”.
Chapter 2 - Part 1 35
Contoh Index untuk Tiga Variabel
Contoh: (Untuk tiga variabel)( g )
Misalkan Variabel tersebut adalah : X, Y, and Z.
Urutan standard nya adalah : X then Y then Z
Urutan standard-nya adalah : X, then Y, then Z.
Index 0 (basis 10) = 000 (basis 2) untuk tiga
i ) i
variables). Ketiga var tersebut adalah komplemen utk minterm 0 ( ) dan tidak ada var yang
k l k M 0 ( )
Z , Y , X
komplemen untuk Maxterm 0 (X,Y,Z).
• Minterm 0, disebut m0= .XYZ
• Maxterm 0, disebut M0 = (X + Y + Z).
• Minterm 6 ?
Chapter 2 - Part 1 36
(10)
Contoh Indeks– Empat Variable.
Index Binary Minterm Maxterm i Pattern mi Mi 0 0000 abcd a+b+c+d 1 0001
3 0011
d c b a
d c b a+ + +
? ?
3 0011 5 0101 7 0111
d c b a+ + + d
c b
a a+b+c+d d c b a+ + + ?
? 7 0111
10 1010 13 1101
d c b a+ + + d
c b
a a+b+c+d d
b ?
? 13 1101
15 1111 d b a
d c b
a a+b+c+d ? c
Chapter 2 - Part 1 37
Hubungan Minterm and Maxterm
Mengulangi: DeMorgan's Theoremg g g
and
Contoh Dua Variabel:
y x y ·
x = + x+y= x⋅y
dan
Jadi M2adalah komplemen dari m2dan
y x
M2 = + m2 =x·y
sebaliknya.
Bila DeMorgan's Theorem terdiri dari nvariabel,
k t di t j t di i d i i b l
maka term diatas juga terdiri dari nvariabel.
Bila :
M
i=
m
i danm
i=
M
i Bila : dan
Maka Miadalah komplemen dari mi.
i
m
M
im
iM
iChapter 2 - Part 1 38
Maka Miadalah komplemen dari mi.
Tabel Fungsi ke-dua2-nya.
Minterms dari Maxterms dari
Minterms dari Maxterms dari 2 variabel 2 variabel
x y m0 m1 m2 m3
0 0 1 0 0 0
x y M0 M1 M2 M3
0 0 0 1 1 1
0 1 0 1 0 0
1 0 0 0 1 0
0 1 1 0 1 1
1 0 1 1 0 1
1 1 0 0 0 1 1 1 1 1 1 0
Masing2 kolom pada tabel fungsi maxterm adalah
komplemen dari kolom tabel fungsi minterm,
k M d l h k l d i
maka Miadalah komplemen dari mi.
Observasi
Pada Tabel fungsi:
• Masing2 minterm mempunyai satu dan hanya satu 1 berada
• 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 2nterms ( maximum of 0s) Selain itu adalah 1
pada 2nterms ( maximum of 0s). Selain itu adalah 1.
Kita dapat mengimplementasikan dengan "ORing" minterms dengan memasukkan "1" kedalam tabel g fungsi. Ini disebut Fungsi dari minterm.
Kita dapat mengimplementasikan dengan "ANDing" t d kk "0" k d l t b l maxterms dengan memasukkan "0" kedalam tabel fungsi. Ini disebut Fungsi dari maxterm.
Jadi ada dua bentuk kanonik:Jadi ada dua bentuk kanonik:
• Sum of Minterms (SOM) – Jumlah sukumin
• Product of Maxterms (POM) – Hasil kali sukumax
(11)
Contoh Fungsi Minterm
Example: Find F
1= m
1+ m
4+ m
7i d + + F
Example: Find F
1m
1+ m
4+ m
7
F1 = x y z + x y z + x y z
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
Chapter 2 - Part 1 41
0 6 0 0 0 0
1 1 1 7 0 + 0 + 1 = 1
Contoh Fungsi Minterm
F(A, B, C, D, E) = m
( ,
,
,
,
)
22+ m
99+ m
1717+ m
2323
F(A, B, C, D, E) =
Chapter 2 - Part 1 42
Contoh Fungsi Maxterm
Contoh: Implementasikan F1 dalam maxterms:
F M M M M M
F1= M0 · M2 · M3 · M5 · M6 )
z y z)·(x y
·(x z) y (x
F1=( +y+ ) ( +y+ ) ( + y+ )
z) y x )·( z y x
·( + + + +
x y zy i M00⋅M22⋅M33⋅M55⋅M66 = F1 0 0 0 0 0 1 1 1 = 0 0 0 1 1 1 1 1 1 1 = 1
⋅
⋅ ⋅⋅ 1 ⋅⋅ ⋅⋅
0 1 0 2 1 0 1 1 1 = 0 0 1 1 3 1 1 0 1 1 = 0 1 0 0 4 1 1 1 1 1 = 1
⋅ ⋅
⋅ ⋅ ⋅⋅
⋅ ⋅
1 0 0 4 1 1 1 1 1 = 1 1 0 1 5 1 1 1 0 1 = 0 1 1 0 6 1 1 1 1 0 = 0
⋅ ⋅ ⋅
⋅ ⋅ ⋅
⋅ ⋅ ⋅
⋅ ⋅ ⋅
Chapter 2 - Part 1 43
1 1 0 6 1 1 1 1 0 0 1 1 1 7 1 ⋅ 1 ⋅ 1 ⋅ 1 ⋅ 1 = 1
Contoh Fungsi Maxterm
g
F(A B C D) M M M M
F(A, B,C,D) =14 11 8
3 M M M
M ) D , C , B , A (
F = ⋅ ⋅ ⋅
(12)
Kanonikal Jumlah dari Minterms
Setiap fungsi Boolean dapat dinyatakan dalam : Sum of Minterms.
• For the function table, the minterms used are the
t di t th 1'
terms corresponding to the 1's
• For expressions, expand all terms first to explicitly list all minterms Do this by “ANDing” any term list all minterms. Do this by ANDing any term missing a variable v with a term ( ).
Example: Implement as a sum of f = x+x y v
v+
p p
minterms.
First expand terms:
y y x ) y y ( x
f = + +
Then distribute terms:
Express as sum of minterms: f = m3 + m2 + m0 y ) y y ( y x y x xy
f = + +
Chapter 2 - Part 1 45
Another SOM Example
Example:p F=A+BC
There are three variables, A, B, and C which we take to be the standard order.
Expanding the terms with missing variables:
C ll t t ( i ll b t f d li t
Collect terms (removing all but one of duplicate terms):
E SOM
Chapter 2 - Part 1 46
Express as SOM:
Shorthand SOM Form
From the previous example, we started with:p p ,
We ended up with: C B A F= +
We ended up with: F = m1+m4+m5+m6+m7
This can be denoted in the formal shorthand: ) 7 , 6 , 5 , 4 , 1 ( ) C , B , A (
F =Σm
Note that we explicitly show the standard variables in order and drop the “m”
) , , , , ( ) , , (
variables in order and drop the m designators.
Canonical Product of Maxterms
Any Boolean Function can be expressed as a Product of Maxterms (POM)
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
d h l i h di ib i l i
v
v
⋅ and then applying the distributive law again. Example: Convert to product of maxterms:
y
x
x
)
z
y
x
(
f
=
+
Apply the distributive law:
y
x
x
)
z
,
y
,
x
(
f
=
+
y
x
)
y
(x
1
)
y
)(x
x
(x
y
x
x
+
=
+
+
=
⋅
+
=
+
Add missing variable z:
y
)
y
(
)
y
)(
(
y
(
x
y
z
)
)
z
y
x
(
z
z
y
x
+
+
⋅
=
+
+
+
+
Express as POM: f = M2 · M3
y
)
y
(
y
(13)
Another POM Example
Convert to Product of Maxterms:
Use x + y z = (x+y)·(x+z) with , B A C B C A C) B,
f(A, = + +
A y C), B (A
x = C+ =
y ( y) ( ) ,
and to get:z =B
) B C B C )(A A C B C (A
f = + + + +
y ), (
Then use to get:
) )( ( y x y x
x + = +
) B C C )(A A BC C (
f = + + + +
and a second time to get:
) B C C )(A A BC C (
f + + + +
) B C )(A A B C (
f = + + + +
Rearrange to standard order,
t i f M M
) B C )(A A B C (
f = + + + +
Chapter 2 - Part 1 49
to give f = M5· M2 C) B )(A C B A (
f = + + + +
Function Complements
The complement of a function expressed as a p p sum of minterms is constructed by selecting the minterms missing in the sum-of-minterms g canonical forms.
Alternatively the complement of a functionAlternatively, the complement of a function expressed by a Sum of Minterms form is simply the Product of Maxterms with the same indices the Product of Maxterms with the same indices.
Example: Given
F
(
x
,
y
,
z
)
=
Σ
m(
1
,
3
,
5
,
7
)
)
6
4
2
0
(
)
(
F
(
x
,
y
,
z
)
Σ
(
0
,
2
,
4
,
6
)
F
=
Σ
m)
7
,
5
,
3
,
1
(
)
z
,
y
,
x
(
F
=
Π
MChapter 2 - Part 1 50
Conversion Between Forms
To convert between sum-of-minterms and product-p of-maxterms form (or vice-versa) we follow these steps:p
• Find the function complement by swapping terms in the list with terms not in the list.
• Change from products to sums, or vice versa.
Example:Given F as before:Example:Given F as before:
F
(
x
,
y
,
z
)
=
Σ
m(
1
,
3
,
5
,
7
)
Form the Complement:
Th th th f ith th i di thi
)
7
,
5
,
3
,
1
(
)
z
,
y
,
x
(
F
Σ
m)
6
,
4
,
2
,
0
(
)
z
,
y
,
x
(
F
=
Σ
m Then use the other form with the same indices – this forms the complement again, giving the other form
f th i i l f ti
F
(
)
Π
(
0
2
4
6
)
Chapter 2 - Part 1 51
of the original function:
F
(
x
,
y
,
z
)
=
Π
M(
0
,
2
,
4
,
6
)
Standard Forms
Standard Sum-of-Products (SOP) form:( )
equations are written as an OR of AND terms
Standard Product-of-Sums (POS) form:Standard Product-of-Sums (POS) form: equations are written as an AND of OR terms
Examples: Examples: • SOP: POS B C B A C B
A + +
C ) C B (A B)
(A+ + +
• POS:
These “mixed” forms are neither SOP nor POS C · ) C B (A · B)
(A+ + +
• • C) (A C) B
(A + +
B) (A C A C B
A + +
(14)
Standard Sum-of-Products (SOP)
A sum of minterms form for
n
variables
can be written down directly from a truth
table.
table.
• Implementation of this form is a two-level network of gates such that:
network of gates such that:
• The first level consists of n-input AND gates, and
and
• The second level is a single OR gate (with fewer than 2ninputs).
fewer than 2 inputs).
This form often can be simplified so that
the corresponding circuit is simpler
Chapter 2 - Part 1 53
the corresponding circuit is simpler.
Standard Sum-of-Products (SOP)
A Simplification Example:
Standard Sum of Products (SOP)
p p
Writing the minterm expression:
)
7
,
6
,
5
,
4
,
1
(
m
)
C
,
B
,
A
(
F
=
Σ
Writing the minterm expression:
F = A B C + A B C + A B C + ABC + ABC
Simplifying:
Simplifying: F =
Simplified F contains 3 literals compared to 15 in
Chapter 2 - Part 1 54
minterm F
AND/OR Two-level Implementation
of SOP Expression
of SOP Expression
The two implementations for F are shown p below – it is quite apparent which is simpler!
A B A B B
C F
B A
A B B
C C
F A
B B C
A B B C B C
SOP and POS Observations
The previous examples show that:p p
• Canonical Forms (Sum-of-minterms, Product-of-Maxterms), or other standard forms (SOP, POS) diff i l it
differ in complexity
• Boolean algebra can be used to manipulate equations into simpler forms.
equations into simpler forms.
• Simpler equations lead to simpler two-level implementations
Questions:
• How can we attain a “simplest” expression?
• Is there only one minimum cost circuit?
(15)
Terms of Use
e
s o Use
All (or portions) of this material © 2008 by Pearson Education, Inc.
Permission is given to incorporate this material or adaptations thereof into classroom presentations and adaptations thereof into classroom presentations and handouts to instructors in courses adopting the latest edition of Logic and Computer Design Fundamentals as the course textbook.
These materials or adaptations thereof are not to be sold or otherwise offered for consideration
sold or otherwise offered for consideration.
This Terms of Use slide or page is to be included within the original materials or any adaptations thereof. g y p
Chapter 2 - Part 1 57
Logic and Computer Design Fundamental
h
Chapter 2
Rangkaian Logika Kombinasi
Rangkaian Logika Kombinasi
Bagian 1 : Rangkaian Gerbang dan
P
B
l
Persamaan Boolean
M M
& Ch l
R Ki
M. Mano & Charles R. Kime
2008, Pearson Education, Inc
,
,
58
Logic and Computer Design Fundamental
Chapter 1
i i l
d
f
i
Digital and Computer Information
M. Mano & Charles R. Kime
2008 Pearson Education Inc
2008, Pearson Education, Inc
(1)
Contoh Indeks– Empat Variable.
Index Binary Minterm Maxterm i Pattern mi Mi
0 0000 abcd a+b+c+d 1 0001
3 0011
d c b a
d c b a+ + +
? ?
3 0011 5 0101
7 0111
d c b a+ + + d
c b
a a+b+c+d d c b a+ + + ?
? 7 0111
10 1010
13 1101
d c b a+ + + d
c b
a a+b+c+d d
b ?
? 13 1101
15 1111 d b a
d c b
a a+b+c+d ? c
Chapter 2 - Part 1 37
Hubungan Minterm and Maxterm
Mengulangi: DeMorgan's Theoremg g g and
Contoh Dua Variabel:
y x y ·
x = + x+y= x⋅y
dan
Jadi M2adalah komplemen dari m2dan
y x
M2 = + m2 =x·y sebaliknya.
Bila DeMorgan's Theorem terdiri dari nvariabel, k t di t j t di i d i i b l maka term diatas juga terdiri dari nvariabel.
Bila :
M
i=
m
i danm
i=
M
i Bila : dan
Maka Miadalah komplemen dari mi.
i
m
M
im
iM
iChapter 2 - Part 1 38
Maka Miadalah komplemen dari mi.
Tabel Fungsi ke-dua2-nya.
Minterms dari Maxterms dari
Minterms dari Maxterms dari 2 variabel 2 variabel
x y m0 m1 m2 m3
0 0 1 0 0 0
x y M0 M1 M2 M3
0 0 0 1 1 1 0 1 0 1 0 0
1 0 0 0 1 0
0 1 1 0 1 1 1 0 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 0
Masing2 kolom pada tabel fungsi maxterm adalah komplemen dari kolom tabel fungsi minterm,
k M d l h k l d i maka Miadalah komplemen dari mi.
Observasi
Pada Tabel fungsi:
• Masing2 minterm mempunyai satu dan hanya satu 1 berada • 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 2nterms ( maximum of 0s) Selain itu adalah 1 pada 2nterms ( maximum of 0s). Selain itu adalah 1.
Kita dapat mengimplementasikan dengan "ORing" minterms dengan memasukkan "1" kedalam tabel g fungsi. Ini disebut Fungsi dari minterm.
Kita dapat mengimplementasikan dengan "ANDing" t d kk "0" k d l t b l maxterms dengan memasukkan "0" kedalam tabel fungsi. Ini disebut Fungsi dari maxterm.
Jadi ada dua bentuk kanonik:Jadi ada dua bentuk kanonik:
• Sum of Minterms (SOM) – Jumlah sukumin • Product of Maxterms (POM) – Hasil kali sukumax
(2)
Contoh Fungsi Minterm
Example: Find F
1= m
1+ m
4+ m
7i d + + F
Example: Find F
1m
1+ m
4+ m
7
F1 = x y z + x y z + x y z
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
Chapter 2 - Part 1 41
0 6 0 0 0 0
1 1 1 7 0 + 0 + 1 = 1
Contoh Fungsi Minterm
F(A, B, C, D, E) = m
( ,
,
,
,
)
22+ m
99+ m
1717+ m
2323
F(A, B, C, D, E) =
Chapter 2 - Part 1 42
Contoh Fungsi Maxterm
Contoh: Implementasikan F1 dalam maxterms:
F M M M M M
F1= M0 · M2 · M3 · M5 · M6
) z y z)·(x y
·(x z) y (x
F1=( +y+ ) ( +y+ ) ( + y+ )
z) y x )·( z y x
·( + + + +
x y zy i M00⋅M22⋅M33⋅M55⋅M66 = F1
0 0 0 0 0 1 1 1 = 0 0 0 1 1 1 1 1 1 1 = 1
⋅
⋅ ⋅⋅ 1 ⋅⋅ ⋅⋅
0 1 0 2 1 0 1 1 1 = 0 0 1 1 3 1 1 0 1 1 = 0 1 0 0 4 1 1 1 1 1 = 1
⋅ ⋅
⋅ ⋅ ⋅⋅
⋅ ⋅
1 0 0 4 1 1 1 1 1 = 1 1 0 1 5 1 1 1 0 1 = 0 1 1 0 6 1 1 1 1 0 = 0
⋅ ⋅ ⋅
⋅ ⋅ ⋅
⋅ ⋅ ⋅
⋅ ⋅ ⋅
1 1 0 6 1 1 1 1 0 0 1 1 1 7 1 ⋅ 1 ⋅ 1 ⋅ 1 ⋅ 1 = 1
Contoh Fungsi Maxterm
g
F(A B C D) M M M M
F(A, B,C,D) =14 11 8
3 M M M
M ) D , C , B , A (
(3)
Kanonikal Jumlah dari Minterms
Setiap fungsi Boolean dapat dinyatakan dalam : Sum of Minterms.
• For the function table, the minterms used are the t di t th 1'
terms corresponding to the 1's
• For expressions, expand all terms first to explicitly list all minterms Do this by “ANDing” any term list all minterms. Do this by ANDing any term missing a variable v with a term ( ).
Example: Implement as a sum of f = x+x y v
v+
p p
minterms.
First expand terms:
y y x ) y y ( x
f = + +
Then distribute terms:
Express as sum of minterms: f = m3 + m2 + m0
y ) y y (
y x y x xy
f = + +
Chapter 2 - Part 1 45
Another SOM Example
Example:p F=A+BC
There are three variables, A, B, and C which we take to be the standard order.
Expanding the terms with missing variables:
C ll t t ( i ll b t f d li t
Collect terms (removing all but one of duplicate terms):
E SOM
Chapter 2 - Part 1 46
Express as SOM:
Shorthand SOM Form
From the previous example, we started with:p p ,
We ended up with: C B A
F= +
We ended up with: F = m1+m4+m5+m6+m7
This can be denoted in the formal shorthand: )
7 , 6 , 5 , 4 , 1 ( ) C , B , A (
F =Σm
Note that we explicitly show the standard variables in order and drop the “m”
) , , , , ( ) , , (
variables in order and drop the m designators.
Canonical Product of Maxterms
Any Boolean Function can be expressed as a Product of Maxterms (POM)
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
d h l i h di ib i l i
v
v
⋅and then applying the distributive law again.
Example: Convert to product of maxterms:
y
x
x
)
z
y
x
(
f
=
+
Apply the distributive law:
y
x
x
)
z
,
y
,
x
(
f
=
+
y
x
)
y
(x
1
)
y
)(x
x
(x
y
x
x
+
=
+
+
=
⋅
+
=
+
Add missing variable z:
y
)
y
(
)
y
)(
(
y
(
x
y
z
)
)
z
y
x
(
z
z
y
x
+
+
⋅
=
+
+
+
+
Express as POM: f = M2 · M3
y
)
y
(
y
(4)
Another POM Example
Convert to Product of Maxterms:
Use x + y z = (x+y)·(x+z) with , B A C B C A C) B,
f(A, = + +
A y C), B (A
x = C+ =
y ( y) ( ) ,
and to get:z =B
) B C B C )(A A C B C (A
f = + + + +
y ), (
Then use to get:
) )( ( y x y x
x + = +
) B C C )(A A BC C (
f = + + + +
and a second time to get:
) B C C )(A A BC C (
f + + + +
) B C )(A A B C (
f = + + + +
Rearrange to standard order,
t i f M M
) B C )(A A B C (
f = + + + +
Chapter 2 - Part 1 49 to give f = M5· M2 C) B )(A C B A (
f = + + + +
Function Complements
The complement of a function expressed as a p p sum of minterms is constructed by selecting the minterms missing in the sum-of-minterms g canonical forms.
Alternatively the complement of a functionAlternatively, the complement of a function expressed by a Sum of Minterms form is simply the Product of Maxterms with the same indices the Product of Maxterms with the same indices.
Example: Given
F
(
x
,
y
,
z
)
=
Σ
m(
1
,
3
,
5
,
7
)
)
6
4
2
0
(
)
(
F
(
x
,
y
,
z
)
Σ
(
0
,
2
,
4
,
6
)
F
=
Σ
m)
7
,
5
,
3
,
1
(
)
z
,
y
,
x
(
F
=
Π
MChapter 2 - Part 1 50
Conversion Between Forms
To convert between sum-of-minterms and product-p of-maxterms form (or vice-versa) we follow these steps:p
• Find the function complement by swapping terms in the list with terms not in the list.
• Change from products to sums, or vice versa.
Example:Given F as before:Example:Given F as before:
F
(
x
,
y
,
z
)
=
Σ
m(
1
,
3
,
5
,
7
)
Form the Complement:
Th th th f ith th i di thi
)
7
,
5
,
3
,
1
(
)
z
,
y
,
x
(
F
Σ
m)
6
,
4
,
2
,
0
(
)
z
,
y
,
x
(
F
=
Σ
m Then use the other form with the same indices – this forms the complement again, giving the other form
f th i i l f ti
F
(
)
Π
(
0
2
4
6
)
of the original function:
F
(
x
,
y
,
z
)
=
Π
M(
0
,
2
,
4
,
6
)
Standard Forms
Standard Sum-of-Products (SOP) form:( )
equations are written as an OR of AND terms
Standard Product-of-Sums (POS) form:Standard Product-of-Sums (POS) form: equations are written as an AND of OR terms
Examples: Examples: • SOP: POS B C B A C B
A + +
C ) C B (A B)
(A+ + +
• POS:
These “mixed” forms are neither SOP nor POS C · ) C B (A · B)
(A+ + +
• • C) (A C) B
(A + +
B) (A C A C B
(5)
Standard Sum-of-Products (SOP)
A sum of minterms form for
n
variables
can be written down directly from a truth
table.
table.
• Implementation of this form is a two-level network of gates such that:
network of gates such that:
• The first level consists of n-input AND gates, and
and
• The second level is a single OR gate (with fewer than 2ninputs).
fewer than 2 inputs).
This form often can be simplified so that
the corresponding circuit is simpler
Chapter 2 - Part 1 53
the corresponding circuit is simpler.
Standard Sum-of-Products (SOP)
A Simplification Example:
Standard Sum of Products (SOP)
p p
Writing the minterm expression:
)
7
,
6
,
5
,
4
,
1
(
m
)
C
,
B
,
A
(
F
=
Σ
Writing the minterm expression:
F = A B C + A B C + A B C + ABC + ABC
Simplifying:
Simplifying: F =
Simplified F contains 3 literals compared to 15 in Chapter 2 - Part 1 54 minterm F
AND/OR Two-level Implementation
of SOP Expression
of SOP Expression
The two implementations for F are shown p below – it is quite apparent which is simpler!
A B A B B
C F
B A
A B B
C C
F A
B B C
A B B C B C
SOP and POS Observations
The previous examples show that:p p
• Canonical Forms (Sum-of-minterms, Product-of-Maxterms), or other standard forms (SOP, POS) diff i l it
differ in complexity
• Boolean algebra can be used to manipulate equations into simpler forms.
equations into simpler forms.
• Simpler equations lead to simpler two-level implementations
Questions:
• How can we attain a “simplest” expression?
• Is there only one minimum cost circuit?
(6)
Terms of Use
e
s o Use
All (or portions) of this material © 2008 by Pearson Education, Inc.
Permission is given to incorporate this material or adaptations thereof into classroom presentations and adaptations thereof into classroom presentations and handouts to instructors in courses adopting the latest edition of Logic and Computer Design Fundamentals as the course textbook.
These materials or adaptations thereof are not to be sold or otherwise offered for consideration
sold or otherwise offered for consideration.
This Terms of Use slide or page is to be included within the original materials or any adaptations thereof. g y p
Chapter 2 - Part 1 57
Logic and Computer Design Fundamental
h
Chapter 2
Rangkaian Logika Kombinasi
Rangkaian Logika Kombinasi
Bagian 1 : Rangkaian Gerbang dan
P
B
l
Persamaan Boolean
M M
& Ch l
R Ki
M. Mano & Charles R. Kime
2008, Pearson Education, Inc
,
,
58
Logic and Computer Design Fundamental