Unit 3 Boolean Algebra (Continued) 1. Exclusive-OR Operation 2. Consensus Theorem Department of Communication Engineering, NCTU 1
3.1 Multiplying Out and Factoring Expressions Department of Communication Engineering, NCTU 2
Distributive laws X(Y+Z) = XY+XZ X+YZ = (X+Y)(X+Z) The third distributive law (X+Y)(X' + Z) = XZ+X' Y Used for multiplying out Department of Communication Engineering, NCTU 3
Also used for factoring Department of Communication Engineering, NCTU 4
3.2 Exclusive-OR and Equivalence Operations Department of Communication Engineering, NCTU 5
Exclusive-OR, ( ) is defined as follows 0 0=0 0 1=1 1 0=1 1 1=0 Exclusive-OR is often abbreviated as XOR The truth table for X Y is A B C=A B 0 0 0 1 1 0 1 1 0 1 1 0 Department of Communication Engineering, NCTU 6
The logic symbol for X Y X Y = X Y+XY = (X+Y)(X +Y ) (X Y) Z = X Y Z E.g. 1 1 + 0 1 1 0 0 Adder Department of Communication Engineering, NCTU 7
Theorems applied exclusive-or X 0 = X (3-8) X 1 = X' (3-9) X X = 0 (3-10) X X' = 1 (3-11) X Y = Y X (commutative law) (3-12) (X Y) Z = X (Y Z) = X Y Z (associative law) (3-13) X 0 = X (3-8) X(Y Z) = XY XZ (distributive law) (3-14) (X Y)' = X Y' = X' Y = XY+X'Y' (3-15) Department of Communication Engineering, NCTU 8
Equivalence operation 0 0 = 1 0 1=0 1 0=0 1 1=1 The truth table for X Y is A B C=A B 0 0 0 1 1 0 1 1 1 0 0 1 Department of Communication Engineering, NCTU 9
The logic symbol for X Y Equivalence gate is often called exclusive-nor (XNOR) (X Y) = XY + X'Y' XNOR NOR A B C=A B A B C=(A+B) ' 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 Department of Communication Engineering, NCTU 10
How to simplify an expression that contains XOR or XNOR Substitute X Y with X'Y+XY' Substitute X Y with XY + X'Y' E.g. F = (A'B C) + (B AC') = [(A'B)C + (A'B)'C'] + [B'(AC') + B(AC')'] = A'BC + (A+B')C' + AB'C' + B(A' + C) = B(A'C + A' + C) + C'(A + B' + AB') = B(A' + C) + C'(A + B') Department of Communication Engineering, NCTU 11
When manipulating expressions that contain several XOR or XNOR operations: (XY' + X'Y)' = XY + X'Y' (3-19) E.g. A' B C = [A'B' + (A')'B] C = (A'B' + AB)C' + (A'B' + AB)'C (by (3-6)) = (A'B' + AB)C' + (A'B + AB')C (by (3-19)) = A'B'C' + ABC' + A'BC + AB'C Department of Communication Engineering, NCTU 12
3.3 The Consensus Theorem Department of Communication Engineering, NCTU 13
XY + X'Z + YZ = XY + X'Z proof : XY + X'Z + YZ = XY + X'Z + (X + X')YZ = (XY + XYZ) + (X'Z + X'YZ) = XY(1 + Z) + X'Z(1 + Y) = XY + X'Z The dual form of the consensus theorem is (X+Y)(X'+Z)(Y+Z) = (X+Y)(X'+Z) proof : (X'Y' + XZ' + Y'Z')' = (X'Y' + XZ') ' = (X+Y)(X'+Z)(Y+Z) = (X+Y)(X'+Z) Department of Communication Engineering, NCTU 14
The final result obtained by application of the consensus theorem may depend on the order in which terms are eliminated E.g Sometimes, we may add a term using the consensus theorem, then use the added terms to eliminate other terms E.g add then A C D A BD BCD ABC ACD A C D A BD BCD ABC ACD F = ABCD + B CDE + A B + BCE ACDE F = ABCD + B CDE + A B + BCE + ACDE F = A B + BCE + ACDE Department of Communication Engineering, NCTU 15
3.4 Algebraic Simplification of Switching Expressions Department of Communication Engineering, NCTU 16
Basic ways of simplifying switching functions Combining terms : use XY + XY' = X E.g. abc'd' + abcd' = abd' Eliminating terms : use X + XY = X or the consensus theorem E.g. E.g. a'b + a'bc = a'b a'bc' + bcd + a'bd = a'bc' + bcd Eliminating laterals : use X + X'Y = X + Y E.g. A'B+A'B'C'D'+ABCD' = A'(B + B'C'D') + ABCD = A'(B + C'D') + ABCD = B(A' + ACD') + A'C'D = B(A' + CD') + A'C'D = A'B + BCD' + A'C'D' (3-26) Department of Communication Engineering, NCTU 17
Adding redundant terms : add XX, multiply (X+X') etc. E.g. WX+XY+X'Z'+WY'Z' (add WZ' by consensus theorem) =WX+XY+X'Z'+WY'Z'+WZ' (eliminate WY'Z') =WX+XY+X'Z'+WZ' (eliminate WZ') =WX+XY+X'Z' (3-27) Department of Communication Engineering, NCTU 18
Some of the theorems of Boolean algebra are not true for ordinary algebra If X + Y = X + Z, then Y = Z (not true) 1 + 0 = 1 + 1 but 1 0 If XY = XZ, then Y = Z (not true for X=0) However, If Y = Z, then X + Y = X + Z (true) If Y = Z, then XY = XZ (true) Department of Communication Engineering, NCTU 19