<<

Lecture 3: The big picture

 Boolean algebra  Part of the combinational topics (memoryless)   Different from sequential logic (can store  Useful laws and information)  Examples  Axioms and theorems allow you to…  … design logic functions  … know how to combine different logic gates  … simplify or optimize complex operations

1 2

Boolean algebra Boolean algebra axioms

1. Closure: 4. Identity:  A Boolean algebra consists of… a+b is in B a+0 = a  a of elements B a•b is in B a•1 = a  binary operators (+ , •) _ 2. Commutative: 5. Distributive:  unary operator (' or ) a+b = b+a a+( b•c) = (a+b)•(a+c) a•b = b•a a•(b+c) = (a•b)+( a•c)

3. Associative: 6. Complementarity: a+( b+c) = ( a+b)+c a+a' = 1 a•(b•c) = ( a•b)•c a•a' = 0

3 4

Binary logic Logic gates and truth tables

XYZ  Axioms hold for binary logic where  AND X•Y XY 0 0 0 0 1 0  B = {0, 1} X Y Z 1 0 0 1 1 1  • → AND  + → OR  OR X + Y XYZ 0 0 0  ' → NOT 0 1 1 X Z Y 1 0 1 _ 1 1 1  A Boolean maps some number of  NOT X' X inputs over {0, 1} into an output set {0, 1} XY X Y 0 1 1 0

5 6 Boolean expressions Precedence

 Any logic function that is expressible as a 1. Parentheses can be written in Boolean 2. NOT algebra. 3. AND XYZ Z=X•Y XYX'Z Z=X'•Y 0 0 0 0 0 1 0 0 1 0 0 1 1 1 4. OR 1 0 0 1 0 0 0 1 1 1 1 1 0 0 ____ X Y X' Y' X •Y X' •Y' Z Z=(X•Y)+(X'•Y') Example: A+B •C = (A)+(B •(C)) 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 7 8

Duality Useful laws and theorems

 Duality (a meta-—a theorem about  Identity theorems ) X+0 = X Dual: X•1 = X  All Boolean expressions have logical duals  Null  Any theorem that can be proved is also proved X+1 = 1 Dual: X•0 = 0 for its dual  Idempotent  Replace: • with +, + with •, 0 with 1, and 1 with 0  Leave the variables unchanged X+X = X Dual: X•X = X  (X')' = X  Example: The dual of X+0= X is X•1= X  Complementarity X + X' = 1 Dual: X•X' = 0

9 10

Useful laws and theorems Useful laws and theorems

 Commutative  Absorption X+Y = Y+X Dual: X•Y = Y•X X+X•Y = X Dual: X•(X+Y) = X  Associative (X+Y')•Y = X•Y Dual: (X•Y')+ Y=X+Y X+( Y+Z) = ( X+Y)+ Z Dual: X•(Y•Z) = ( X•Y)•Z  Distributive  Consensus X•(Y+Z) = ( X•Y)+( X•Z) Dual: X+( Y•Z) = ( X+Y )•(X+Z ) X•Y+Y•Z+X'•Z = X•Y+X'•Z  Uniting Dual: ( X+Y)•(Y+Z)•(X'+ Z) = ( X+Y)•(X'+ Z) X•Y+X•Y' = X Dual: (X+Y)•(X+Y') = X  Multiplying and factoring (X+Y)•(X'+ Z) = X•Z+X'•Y Dual: X•Y+X'•Z = ( X+Z)•(X'+ Y)

11 12 DeMorgan's law Proving theorems

 Procedure for complementing Boolean functions  Example 1: Uniting theorem  Replace: • with +, + with •, 0 with 1, and 1 with 0 X•Y+X•Y' = X•(Y+Y') Distributive  Replace all variables with their complements = X•(1) Complementarity = X Identity  Look familiar?  Duality: "Leave the variables unchanged"  Example 2: Absorption  However, duality and DeMorgan's are NOT the same thing! X+X•Y = X•1+ X•Y Identity = X•(1+ Y) Distributive  Example: ___ The complement of F = X•Y is F = X+Y = X •(1) Null = X Identity

13 14

Proving theorems Applying DeMorgan's

 Example 3: Consensus  Find the complement of F=(A+B)•(A’+C). X•Y+Y•Z+X'•Z  Answer: F’=(A’•B’)+(A•C’) = XY + (1) YZ + X'Z Identity A B C F A B C F’ = XY + ( X+X') YZ + X'Z Complementarity 0 0 0 0 0 0 0 1 = XY + XYZ + X'YZ + X'Z Distributive 0 0 1 0 0 0 1 1 = XY + X'YZ + X'Z Absorption 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 {AB + A = A} with A = XY and B = Z 1 0 0 0 1 0 0 1 = XY + X'Z Absorption 1 0 1 1 1 0 1 0 {AB + A = A} with A = X'Z and B = Y 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 15 16

Logic simplification

Z = A'BC + AB'C' + AB'C + ABC' + ABC = A'BC + AB'(C' + C) + AB(C' + C) Distributive = A'BC + AB'(1) + AB(1) Complementarity = A'BC + AB' + AB Identity = A'BC + A(B' + B) Distributive = A'BC + A(1) Complementarity = A'BC + A Identity = BC + A Absorption {( X•Y')+ Y=X+Y} with X = BC and Y = A

17