Logika biner (2nd update)

82
Logika Biner Nugroho Adi Pramono [email protected] [email protected]

description

update dari slide sebelumnya, mencakup tugas

Transcript of Logika biner (2nd update)

Page 2: Logika biner (2nd update)

terdiri

variabel biner

operasi logika

Page 3: Logika biner (2nd update)

Variabel Biner

A, B, C

x, y, z

punya dua (dan hanya dua) kemungkinan nilai

0, 1

Page 4: Logika biner (2nd update)

Operasi Logika

AND

OR

NOT

Page 5: Logika biner (2nd update)

AND

x . y = z

x AND y is equal to z

x DAN y sama dengan z

xy = z

Page 6: Logika biner (2nd update)

OR

x + y = z

x OR y is equal to z

x ATAU y sama dengan z

Page 7: Logika biner (2nd update)

NOT

x’ = z

NOT x is equal to z

BUKAN x sama dengan z

(operasi komplemen)

Page 8: Logika biner (2nd update)

Logika Biner ≠ Aritmatika Biner

1 + 1 = 10 -> satu tambah satu sama dengan dua(aritmatika)

1 + 1 = 1 -> satu ATAU satu sama dengan satu (logika)

Page 9: Logika biner (2nd update)

Tabel Kebenaran

Page 10: Logika biner (2nd update)

Gerbang Logika

Rangkaian elektronik

Beberapa input

Satu output

Page 11: Logika biner (2nd update)

Gerbang Logika

Page 12: Logika biner (2nd update)

Gerbang AND

Page 13: Logika biner (2nd update)

Gerbang AND

Page 14: Logika biner (2nd update)

Gerbang AND

Page 15: Logika biner (2nd update)

Gerbang AND

Page 16: Logika biner (2nd update)

Gerbang OR

Page 17: Logika biner (2nd update)

Gerbang OR

Page 18: Logika biner (2nd update)

Gerbang OR

Page 19: Logika biner (2nd update)

Gerbang OR

Page 20: Logika biner (2nd update)

Gerbang NOT

Page 21: Logika biner (2nd update)

Gerbang NOT

Page 22: Logika biner (2nd update)

The Timing Diagram

Page 23: Logika biner (2nd update)

Bagaimana timing-diagram-nya

jika inputnya lebih dari dua

Page 24: Logika biner (2nd update)

Aljabar Boolean

Page 25: Logika biner (2nd update)

Definisi

S adalah himpunan

x, y adalah obyek

x ∈ S artinya x anggota S

y ∉ S artinya y bukan elemen S

Page 26: Logika biner (2nd update)

Definisi

A = [1, 2, 3, 4]

Elemen himpunan A adalah angka 1, 2, 3, 4

Page 27: Logika biner (2nd update)

Operator Biner

a * b = c

* adalah operator biner

untuk mendapatkan c dari pasangan (a, b)

syarat a,b,c ∈ S

* bukan operator biner jika a,b ∈ S dan c ∉ S

Page 28: Logika biner (2nd update)

Postulat

Closure

Associative Law

Commutative Law

Identity Element

Inverse

Distributive Law

Page 29: Logika biner (2nd update)

Closure

Closure, tertutup

untuk setiap a, b ∈ N

selalu ada c ∈ N

yang memenuhi a + b = c

N tidak tertutup jika menggunakan operator -

Page 30: Logika biner (2nd update)

Associative Law

( x * y ) * z = x * ( y * z )

untuk semua x, y, z, ∈ S

Page 31: Logika biner (2nd update)

Commutative Law

x * y = y * x

untuk semua x, y ∈ S

Page 32: Logika biner (2nd update)

Identity Element

e * x = x * e = x untuk setiap x ∈ S

x + 0 = 0 + x = x untuk setiap x ∈ I

himpunan N tidak punya elemen identitas

Page 33: Logika biner (2nd update)

Identity Element

e * x = x * e = x untuk setiap x ∈ S

x + 0 = 0 + x = x untuk setiap x ∈ I

himpunan N tidak punya elemen identitas

Page 34: Logika biner (2nd update)

Inverse

jika S punya elemen identitas e

maka x ∈ S dikatakan punya invers y ∈ S

jika memenuhi x * y = e

Page 35: Logika biner (2nd update)

Distributive Law

x * ( y . z ) = ( x * y ) . ( x * z )

Page 36: Logika biner (2nd update)

Gunakan timing diagram !Bagaimanakah f dan g?

Page 37: Logika biner (2nd update)

Gunakan timing diagram !Bagaimanakah f dan g?

Page 38: Logika biner (2nd update)

Axioma

himpunan B

Page 39: Logika biner (2nd update)

Axioma

bersifat tertutup untuk operator + dan .

Page 40: Logika biner (2nd update)

Axioma

0 adalah elemen identitas untuk +

1 adalah elemen identitas untuk .

Page 41: Logika biner (2nd update)

Axioma

operator + bersifat komutatif

x + y = y + x

Page 42: Logika biner (2nd update)

Axioma

operator . bersifat komutatif

x . y = y . x

Page 43: Logika biner (2nd update)

Axioma

operator + bersifat distributif

x . ( y + z ) = ( x . y ) + ( x . z )

Page 44: Logika biner (2nd update)

Axioma

operator .bersifat distributif

x + ( y . z ) = ( x + y ) . ( x + z )

Page 45: Logika biner (2nd update)

“Hati-hati terhadap sifat distributif”

Page 46: Logika biner (2nd update)

Axioma

untuk setiap x ∈ B

terdapat x’ ∈ B (komplemen)

sehingga x + x’ = 1

dan x . x’ = 0

Page 47: Logika biner (2nd update)

Axioma

terdapat setidaknya dua elemen

x, y ∈ B

yang memenuhi x ≠ y

Page 48: Logika biner (2nd update)

Dualitas

kita dapat menukar OR dan AND dengan mengganti 0 dengan 1 atau sebaliknya

Page 49: Logika biner (2nd update)

Dualitas

x + 0 = x

x . 1 = x

Page 50: Logika biner (2nd update)

Dualitas

x + 1 = 1

x . 0 = 0

Page 51: Logika biner (2nd update)

Dan dia hidup bahagia selama-lamanya...

Page 52: Logika biner (2nd update)

Fungsi Boolean

F1 = x + y’z

Page 53: Logika biner (2nd update)

Fungsi Boolean

Page 54: Logika biner (2nd update)

Fungsi Boolean

F2 = x’y’z + x’yz + xy’

Page 55: Logika biner (2nd update)

Fungsi Boolean

F2 = x’y’z + x’yz + xy’

= x’z (y’+y) + xy’

= x’z + xy’

Page 56: Logika biner (2nd update)

Fungsi Boolean

Page 57: Logika biner (2nd update)

Fungsi Boolean

Page 58: Logika biner (2nd update)

Fungsi Boolean

x ( x’ + y )

= xx’ + xy

= 0 + xy

= xy

Page 59: Logika biner (2nd update)

Fungsi Boolean

x + x’y

= ( x + x’ ) ( x + y )

= 1 ( x + y )

= x + y

Page 60: Logika biner (2nd update)

Fungsi Boolean

( x + y ) ( x + y’ )

= x + xy + xy’ + yy’

= x ( 1 + y + y’ )

= x

Page 61: Logika biner (2nd update)

Fungsi Boolean

xy+x’z+yz

=xy+x’z+yz(x+x’)

= xy + x’z + xyz + x’yz

= xy(1 + z) + x’z(1 + y)

= xy + x’z.

Page 62: Logika biner (2nd update)

Fungsi Boolean

(x + y)(x’ + z)(y + z)

= (x + y)(x’ + z)

Page 63: Logika biner (2nd update)

Komplemen dari Fungsi

(A+B+C+D+ … +F)’ = A’B’C’D’…F’

(ABCD…F)’ = A’+B’+C’+D’+ …+F’

Page 64: Logika biner (2nd update)

(A + B + C)’ = (A + x)’

= A’ x’

=A’ ( B + C )’

=A’ ( B’ C’ )

Page 65: Logika biner (2nd update)

F = x’yz’ + x’y’z

F’ = (x’yz’ + x’y’z)’

=(x’yz’)’(x’y’z)’

=(x + y’ + z)(x + y + z')

Page 66: Logika biner (2nd update)

F1 = x’y’z’ + x’y’z

F2=x(y’z’ + yz)

F3 = xyz + x’y’z’

F4=x’(yz’ + yz)

Page 67: Logika biner (2nd update)

Dual

F1 = x’yz’ + x’y’z

dual F1=(x’+y+z’)(x’+y’+z)

komplemen F1=F1’=(x+y’+z)(x+y+z’)

Page 68: Logika biner (2nd update)

Minterm & Maxterm

variabel biner

x atau x’

Page 69: Logika biner (2nd update)

Minterm

standart product

x’y’, x’y, xy’, xy

Page 70: Logika biner (2nd update)

Maxterm

standart sum

x’+y’, x’+y, x+y’, x+y

Page 71: Logika biner (2nd update)
Page 72: Logika biner (2nd update)
Page 73: Logika biner (2nd update)

f1 =x’y’z+xy’z’+xyz

=m1 +m4 +m7

Page 74: Logika biner (2nd update)

f2 =x’yz+xy’z+xyz’+xyz

=m3 +m5 +m6 +m7

Page 75: Logika biner (2nd update)

tugas

Page 76: Logika biner (2nd update)

tugas

Page 77: Logika biner (2nd update)

tugas

Page 78: Logika biner (2nd update)

F = A + B

Dan dia hidup bahagia selama-lamanya...

A B F

0 0 0

0 1 1

1 0 1

1 1 1

Page 79: Logika biner (2nd update)

F = AB + B

Dan dia hidup bahagia selama-lamanya...

A B AB F

0 0 0 0

0 1 0 0

1 0 0 1

1 1 1 1

Page 80: Logika biner (2nd update)

F = A + BC

Dan dia hidup bahagia selama-lamanya...

A B C BC F

0 0 0 0 0

0 0 1 0 0

0 1 0 0 0

0 1 1 1 1

1 0 0 0 1

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

Page 81: Logika biner (2nd update)

–Johnny Appleseed

“Type a quote here.”

Dan dia hidup bahagia selama-lamanya...

Page 82: Logika biner (2nd update)

Selesai

Dan dia hidup bahagia selama-lamanya...