320 likes | 806 Vues
BOOLEAN ALGEBRA. อ.เกล็ดดาว สุวรรณสวัสดิ์ ห้อง 1004. http://www.kmitl.ac.th/~kskledda. Course Outline. Boolean Algebra Relations Graphs Trees. หนังสืออ้างอิง. Kenneth H. Rosen, “Discrete Mathematics and Its Applications”, International Edition, McGraw – Hill. คะแนน. Exam 50%.
E N D
BOOLEAN ALGEBRA อ.เกล็ดดาว สุวรรณสวัสดิ์ ห้อง 1004 http://www.kmitl.ac.th/~kskledda
Course Outline • Boolean Algebra • Relations • Graphs • Trees
หนังสืออ้างอิง • Kenneth H. Rosen, “Discrete Mathematics and Its Applications”, International Edition, McGraw – Hill คะแนน • Exam 50%
Boolean Algebra Operation • 1 หรือ True • 0 หรือ False • ∙ หรือ And / Sum • + หรือ Or / Product
Basic Law of Boolean Algebra • 1 + 1 = 1 , 1 + 0 = 1 , 0 + 1 = 1 , 0 + 0 = 0 • 1 ∙ 1 = 1 , 1 ∙ 0 = 0 , 0 ∙ 1 = 0 , 0 ∙ 0 = 0
Example 1 • F (x, y) = x ∙ y
Example 2 • F (x, y) = xy + z
Law of Boolean Algebra (1) (1) Law of the double complement • x = x (2) Idempotent laws • x + x = x • x ∙ x = x
Law of Boolean Algebra (2) (3) Identity laws • x + 0 = x • x ∙ 1 = x (4) Domination laws • x + 1 = 1 • x ∙ 0 = 0
Law of Boolean Algebra (3) (5) Commutative laws • x + y = y + x • x ∙ y = y ∙ x (6) Associative laws • x + (y + z) = (x + y) + z • x (yz) = (xy)z
Law of Boolean Algebra (4) (7) Distributive laws • x + (yz) = (x + y)(x + z) • x (y + z) = xy + xz (8) De Morgan’s laws • xy = x +y • x + y = x ∙y
Law of Boolean Algebra (5) (9) Absorption laws • x + xy = x • x (x + y) = x (10) Unit property • x +x = 1 (11) Zero property • xx = 0
Example: find Boolean expression • Find Boolean expression that represent the functions F(x,y,z) and G(x,y,z) which are given in table • F(x,y,z) = xy z G(x,y,z) = x yz +x yz
Example: find function expansion • Find function expansion for the function F(x,y,z) = (x + y)z and determine the function F(x,y,z) = (x + y)z = xz + yz = x 1z + 1 yz = x (y +y)z + (x +x) yz = xyz + xyz + xyz + xyz Distributive law Identity law Unit property Distributive law Idempotent law
Logic Gates x xy AND gate y x + y x OR gate y x x Inverter
Combination of Gate (1) • xy + xz • x + xy x xy y xy + xz xz z x x + xy x xy y
Combination of Gate (2) x xy y xy + xy x xy x y x xy y xy + xy x xy
Example: combination of gate • (x + y)x • x (y +z) • (x + y + z)xyz • xy + xz + yz • xy + xy • xyz + xyz + x yz + xy z
Minimization of Circuits using laws (1) • xyz + xy z = (y +y)(xz) = 1 ∙ xz = xz • x + x = (x + x) ∙ 1 = (x + x) ∙ (x +x) = x + (x +x) = x + 0 = x
Minimization of Circuits using laws (2) • x + xy = x ∙ 1 + xy = x (1 + y) = x (y + 1) = x ∙ 1 = x • x + 1 = (x + 1) ∙ 1 = (x + 1) ∙ (x +x) = x + 1 ∙x = x +x = 1 Identity laws Distributive laws Commutative laws Domination laws Identity laws Identity laws Unit property Distributive laws Identity laws Unit property
Minimization of Circuits using k-maps K-maps in 2 variables K-maps in 3 variables xyz xy z xyz xy z
Example: minimization of circuits using k-maps (1) • xy +xy • xy + x y • xy +x y +xy = y = xy + x y = x + y
Example: minimization of circuits using k-maps (2) • xyz +xyz • xyz + xyz + xyz + xyz • xyz + xyz + xyz + xyz = yz = z = x
Duality • 1 0 • 0 1 • + ∙ • ∙ +
Example: Duality • a + b = 0 a ∙ b = 1 • (a + 0) + (1 ∙a) = 1 (a ∙ 1) ∙ (0 +a) = 0 • a ∙ (a + b) = a ∙ b a + (a ∙ b) = a + b