Materi | Catatan Kuliah

(1)

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:

AND

OR

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 tableSuatu 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 + YZ

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 y

y y

x⋅ ⋅ = + + =

(

x y

)

x Absorption x

x y x

x+ ⋅ = ⋅ + =

+x x

ƒ

x+ ⋅y =x+y x

(

+y

)

= xy Simplification Consensus z

y x z y z y

x + + = +

x x

x x

ƒ

xy+ ⋅z+yz =xy+ ⋅z Consensus

(

x+y

)

(

+z

)

(

y+z

) (

= x+y

)

(

+z

)

x x

x x

x yy

ƒ

x+ = xy = +x y DeMorgan'sLaws

Pembuktian 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

y

0 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 1

0 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= xy

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 dan

m

i

=

M

i

ƒ Bila : dan

Maka Miadalah komplemen dari mi.

i

m

M

i

m

i

M

i

Chapter 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

7

i d + + F

Example: Find F

1

m

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 M00M22M33M55M66 = 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 (

Fm

ƒ 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

=

Π

M

Chapter 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= xy

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 dan

m

i

=

M

i

ƒ Bila : dan

Maka Miadalah komplemen dari mi.

i

m

M

i

m

i

M

i

Chapter 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 beradaMasing2 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 sukuminProduct of Maxterms (POM) – Hasil kali sukumax


(2)

Contoh Fungsi Minterm

ƒ

Example: Find F

1

= m

1

+ m

4

+ m

7

i d + + F

Example: Find F

1

m

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 M00M22M33M55M66 = 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 (

Fm

ƒ 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

=

Π

M

Chapter 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

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