Download presentation
Presentation is loading. Please wait.
Published byMeryl Wilkinson Modified over 9 years ago
1
1 CSE370, Lecture 3 Lecture 3: Boolean Algebra u Logistics u Last lecture --- Numbers n Binary numbers n Base conversion n Number systems for negative numbers n A/D and D/A conversion u Today’s lecture n Boolean algebra íAxioms íUseful laws and theorems íExamples
2
2 CSE370, Lecture 3 The “WHY” slide u Boolean Algebra n When we learned numbers like 1, 2, 3, we also then learned how to add, multiply, etc. with them. Boolean Algebra covers operations that we can do with 0’s and 1’s. Computers do these operations ALL THE TIME and they are basic building blocks of computation inside your computer program. u Axioms, laws, theorems n We need to know some rules about how those 0’s and 1’s can be operated on together. There are similar axioms to decimal number algebra, and there are some laws and theorems that are good for you to use to simplify your operation.
3
3 CSE370, Lecture 3 How does Boolean Algebra fit into the big picture? u It is part of the Combinational Logic topics (memoryless) n Different from the Sequential logic topics (can store information) u Learning Axioms and theorems of Boolean algebra íAllows you to design logic functions íAllows you to know how to combine different logic gates íAllows you to simplify or optimize on the complex operations
4
4 CSE370, Lecture 3 Boolean algebra u A Boolean algebra comprises... n A set of elements B n Binary operators {+, }Boolean sum and product n A unary operation { ' } (or { }) example: A’ or A u …and the following axioms n 1. The set B contains at least two elements {a b} with a b n 2. Closure: a+b is in Bab is in B n 3. Commutative: a+b = b+aab = ba n 4. Associative: a+(b+c) = (a+b)+ca(bc) = (ab)c n 5. Identity: a+0 = aa1 = a n 6. Distributive: a+(bc)=(a+b)(a+c)a(b+c)=(ab)+(ac) n 7. Complementarity: a+a' = 1aa' = 0 _ _
5
5 CSE370, Lecture 3 Digital (binary) logic is a Boolean algebra u Substitute n {0, 1} for B n AND for Boolean Product. In CSE 321 this was n OR for + Boolean Sum. In CSE 321 this was n NOT for ‘ Complement. In CSE 321 this was u All the axioms hold for binary logic u Definitions n Boolean function íMaps inputs from the set {0,1} to the set {0,1} n Boolean expression íAn algebraic statement of Boolean variables and operators
6
6 CSE370, Lecture 3 XYZ000010100111XYZ000010100111 X Y Z XYZ000011101111XYZ000011101111 X Y Z Logic Gates (AND, OR, Not) & Truth Table u ANDXYXY u ORX+Y u NOTXX' XY0110XY0110 X Y
7
7 CSE370, Lecture 3 XYX'Y'X YX' Y' Z 0011 0 1 1 0110 0 0 0 1001 0 0 0 1100 1 0 1 XYX'Z 0010 0111 1000 1100 XYZ000010100111XYZ000010100111 Logic functions and Boolean algebra u Any logic function that is expressible as a truth table can be written in Boolean algebra using +,, and ' Z=XY Z=X'Y Z=(XY)+(X' Y')
8
8 CSE370, Lecture 3 Some notation u Priorities: u Variables and their complements are sometimes called literals
9
9 CSE370, Lecture 3 Two key concepts u Duality (a meta-theorem— a theorem about theorems) n All Boolean expressions have logical duals n Any theorem that can be proved is also proved for its dual n Replace: with +, + with, 0 with 1, and 1 with 0 n Leave the variables unchanged u de Morgan’s Theorem n Procedure for complementing Boolean functions n Replace: with +, + with, 0 with 1, and 1 with 0 n Replace all variables with their complements
10
10 CSE370, Lecture 3 Useful laws and theorems Identity: X + 0 = X Dual: X 1 = X Null: X + 1 = 1 Dual: X 0 = 0 Idempotent: X + X = X Dual: X X = X Involution: (X')' = X Complementarity: X + X' = 1 Dual: X X' = 0 Commutative: X + Y = Y + X Dual: X Y = Y X Associative: (X+Y)+Z=X+(Y+Z) Dual: (XY)Z=X(YZ) Distributive: X(Y+Z)=(XY)+(XZ) Dual: X+(YZ)=(X+Y)(X+Z) Uniting: XY+XY'=X Dual: (X+Y)(X+Y')=X
11
11 CSE370, Lecture 3 Useful laws and theorems (con’t) Absorption: X+XY=XDual: X(X+Y)=X Absorption (#2): (X+Y')Y=XYDual: (XY')+Y=X+Y de Morgan's: (X+Y+...)'=X'Y'...Dual: (XY...)'=X'+Y'+... Duality: (X+Y+...) D =XY...Dual: (XY...) D =X+Y+… Multiplying & factoring: (X+Y)(X'+Z)=XZ+X'Y Dual: XY+X'Z=(X+Z)(X'+Y) Consensus: (XY)+(YZ)+(X'Z)= XY+X'Z Dual: (X+Y)(Y+Z)(X'+Z)=(X+Y)(X'+Z)
12
12 CSE370, Lecture 3 Proving theorems u Example 1: Prove the uniting theorem-- XY+XY'=X Distributive XY+XY' = X(Y+Y') Complementarity = X(1) Identity = X u Example 2: Prove the absorption theorem-- X+XY=X Identity X+XY = (X1)+(XY) Distributive = X(1+Y) Null = X(1) Identity = X
13
13 CSE370, Lecture 3 Proving theorems u Example 3: Prove the consensus theorem-- (XY)+(YZ)+(X'Z)= XY+X'Z Complementarity XY+YZ+X'Z = XY+(X+X')YZ + X'Z Distributive = XYZ+XY+X'YZ+X'Z íUse absorption {AB+A=A} with A=XY and B=Z = XY+X'YZ+X'Z Rearrange terms = XY+X'ZY+X'Z íUse absorption {AB+A=A} with A=X'Z and B=Y XY+YZ+X'Z = XY+X'Z
14
14 CSE370, Lecture 3 de Morgan’s Theorem u Use de Morgan’s Theorem to find complements u Example: F=(A+B)(A’+C), so F’=(A’B’)+(AC’) A BC F0 0 0 01 00 1 0 11 1 1 00 0 1 01 1 1 10 01 1 A BC F’ 0 00 1 0 01 1 0 10 0 0 11 0 1 00 11 0 1 10 1 1 11 0
15
15 CSE370, Lecture 3 One more example of logic simplification u Example: Z = A'BC + AB'C' + AB'C + ABC' + ABC = A'BC + AB'(C’ + C) + AB(C' + C) distributive = A'BC + AB’ + AB complementary = A'BC + A(B' + B) distributive = A'BC+ A complementary = BC + Aabsorption #2 Duality (X Y')+Y=X+Y with X=BC and Y=A
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.