CH3 Boolean Algebra (cont
CH3 Boolean Algebra (cont ’ ’ d) d)
Lecturer:吳安宇 Date:2005/10/7
Introduction Introduction
v Today, you’ll know:
1. Guidelines for multiplying out/factoring expressions 2. Exclusive-OR and Equivalence operations
3. Positive logic and negative logic 4. More about consensus theorem
5. Algebraic simplification of switching expressions 6. Approach to prove validity of an equation
7. The difference between ordinary algebra and Boolean algebra
Guidelines for Multiplying Out and Guidelines for Multiplying Out and
Factoring Factoring
vUse X(Y+Z) = XY + XZ ...(1) (X+Y)(X+Z) = X + YZ ...(2) (X+Y)(X’+Z) = XZ + X’Y ...(3)
vFor multiplying out, (2) and (3) should be generally applied before (1) to avoid generating unnecessary terms
vFor factoring, apply (1), (2), (3) from right terms to
Multiplying Out Expression Multiplying Out Expression
EX. F = (Q + AB)(C’D + Q’) = QC’D + Q’AB or F = QC’D + QQ’ + AB’C’D + AB’Q’
EX. (A+B+C’)(A+B+D)(A+B+E)(A+D’+E)(A’+C)
= (A+B+C’D)(A+B+E)[AC+A’(D’+E)]
= (A+B+C’DE)(AC+A’D’+A’E)
= AC+ABC+A’BD’+A’BE+A’C’DE (SOP form)
Distributed Law
Factoring Expression Factoring Expression
v EX.
AC + A’BD’ + A’BE + A’C’DE
= AC + A’(BD’ + BE + C’DE)
XZ + X’Y = (X + Y)(X’ + Z)
= (A + BD’ + BE + C’DE)(A’ + C)
= [ A + C’DE + B (D’ + E) ](A’ + C) X + YZ = (X+Y)(X+Z)
= (A + C’DE + B)(A + C’DE + D’ + E)(A’ + C)
= (A + B + C’)(A + B + D)(A + B + E)(A + D’ + E)(A’ + C)
3.2 Exclusive
3.2 Exclusive - - OR Operations OR Operations
vExclusive-OR (XOR)
X Y X Y 0 0
0 1 1 0 1 1
0 1 1 0 Truth Table
Symbol
Boolean Expression : X Y = X’Y + XY’
Exclusive
Exclusive - - OR Operations OR Operations
vUseful Theorems :
X 0 = X X Y = Y X (commutative)
X 1 = X’ (X Y) Z = X (Y Z) (associative) X X = 0 X(Y Z) = XY XZ (distributive)
X X’= 1 (X Y)’ = X Y’ = X’ Y = XY + X’Y’
Proof of Distributive Laws Proof of Distributive Laws
vXY XZ = XY(XZ)’ + (XY)’XZ
= XY(X’ + Z’) + (X’ + Y’)XZ
= XYZ’ +XY’Z
= X(YZ’ + Y’Z)
= X(Y Z)
Equivalence Operations Equivalence Operations
(Exclusive NOR) (Exclusive NOR)
X Y X Y (X Y)’
0 0 0 1 1 0 1 1
1 0 0 1
1 0 0 1
X Y = XY + X’Y’
Simplification of XOR and XNOR Simplification of XOR and XNOR
vX Y = X’Y + XY’
X Y = X’Y’ + XY n EX (see p.62).
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’) ( can be further simplified)
3.3 Consensus Theorem 3.3 Consensus Theorem
XY + X’Z + YZ = XY + X’Z (YZ is redundant ) 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
How to Find Consensus Term?
How to Find Consensus Term?
1. Find a pair of terms, one of which contains a variable and the other contains its complement
A’C’D + A’BD + BCD + ABC + ACD’ (A ↔ A’)
2. Ignore the variable and its complement, the left variables composite the consensus term
(A’BD) + (ABC) → BD·BC = BCD (redundant term)
Consensus Theorem Consensus Theorem
vApplication to eliminate redundant terms from Boolean Expressions
a’b’ + ac + bc’ + b’c +ab = a’b’ + ac + bc’
Consensus Theorem Consensus Theorem
Example (others are on p.67) :
(a + b + c’)(a + b + d’)(b + c + d’)
= (a + b + c’)(b + c + d’)
nDual form of consensus theorem
(X + Y)(X’ + Z)(Y + Z) = (X + Y)(X’ + Z)
(a+ b + c’) + (b + c +d’) → a+b + b+d’ = a+b+d’
Algebraic Simplification of Switching Algebraic Simplification of Switching
Expression Expression
vA. Combining Terms
XY + XY’ =X(Y + Y’) = X
n EX.1 abc’d’ + abcd’ = abd’ (X = abd’, Y = c) n EX.2 ab’c + abc + a’bc
= ab’c + abc + abc + a’bc
= ac + bc
n EX.3 (a + bc)(d + e’) + a’(b’ + c’)(d + e’)
= d + e’
Expression Expression
vRule B -- Eliminating Terms :
X + XY = X
XY + X’Z + YZ = XY + X’Z n EX.1
a’b + a’bc = a’b (X = a’b)
a’bc’ + bcd + a’bd = a’bc’ + bcd (X = c, Y = bd, Z = a’b)
Algebraic Simplification of Switching Algebraic Simplification of Switching
Expression Expression
vRule C -- Eliminating Literals :
X + X’Y = (X + X’)(X + Y) = X + Y n EX. A’B + A’B’C’D’ + ABCD’
= A’(B + B’C’D’) + ABCD (common term - A’)
= A’(B + C’D’) + ABCD (Rule C)
= B(A’ + ACD) + A’C’D’ (common term - B)
= B(A’ + CD) + A’C’D’ (Rule C)
Expression Expression
vRule D -- Adding Redundant Terms
vAdd XX’ = 0
vMultiply by (X + X’) = 1
vAdd YZ to (XY + X’Z) (reverse of Consensus)
ØBecause XY + X’Z + YZ = XY + X’Z
vAdd XY to X
Algebraic Simplification of Switching Algebraic Simplification of Switching
Expression Expression
vEX.1 of “Adding Redundant Terms”
WX + XY + X’Z’ + WY’Z
= WX + XY + X’Z’ + WY’Z’ + W’Z
(add W’Z by Consensus Theorem)
= WX + XY + X’Z’ + WZ’
(eliminate WY’Z’ by WZ’)
= WX + XY + X’Z’
Expression Expression
n EX.2
A’B’C’D’ + A’BC’D’ + A’BD + A’BC’D + ABCD + ACD’
+ B’CD’
= A’C’D’ + A’BD + B’CD’ + ABC (A, B, C, D methods are applied)
n No easy way to determine when a Boolean Expression has a min. no. of terms or literals n Systematic way is presented in Ch.5 & CH.6
Proving Validity of an Equation Proving Validity of an Equation
vApproach :
vConstruct a Truth Table
vManipulate one side of the equation till it’s identical to the other side
vReduce both sides independently to the same equation
v(a) Perform same operation on both sides (b) Cannot Subtract or Divide both sides
Proving Validity of an Equation Proving Validity of an Equation
vUsually :
vReduce both sides to Sum of Products (SOP) vCompare both sides
vTry to Add or Delete terms by using Theorems
Proving Validity of an Equation Proving Validity of an Equation
vEX.1 Show that
A’BD’ + BCD + ABC’ + AB’D
= BC’D’ + AD + A’BC By Consensus Theorem :
A’BD’ + BCD + ABC’ + AB’D + BC’D’ + A’BC + ABD
= AD + A’BD’ + BCD + ABC’ + BC’D’ + A’BC
1 2 3
1 + 2 1 + 3 2 + 3
Proving Validity of an Equation Proving Validity of an Equation
vEX.2 Show
A’BC’D + (A’ + BC)(A + C’D’) + BC’D + A’BC’
= ABCD + A’C’D’ + ABD + ABCD’ + BC’D n Reducing the left side
A’BC’D + (A’ + BC)(A + C’D’) + BC’D + A’BC’
= (A’ + BC)(A + C’D’) + BC’D + A’BC’
= ABC + A’C’D’ + BC’D + A’BC’
Proving Validity of an Equation Proving Validity of an Equation
vEX.2(cont.)
vReducing the left side
ABCD + A’C’D’ + ABD + ABCD’ + BC’D
= ABC + A’C’D’ + ABD + BC’D
= ABC + A’C’D’ + BC’D
n Because both sides were independently reduced to the same expression, the original equation is
Boolean Algebra & Ordinary Algebra Boolean Algebra & Ordinary Algebra
vBoolean Algebra ≠ Ordinary Algebra EX.1 X + Y = X + Z => Y = Z (?)
X = 1, Y = 0 => 1 + 0 = 1 + 1 But 0 ≠ 1
EX.2 “If XY = XZ then Y = Z”
True : when X ≠ 0 False : when X = 0
Boolean Algebra & Ordinary Algebra Boolean Algebra & Ordinary Algebra
vEX.3 if Y = Z then X + Y = X + Z (V) if Y = Z then XY = XZ (V)
n Add/Multiply the same term => Valid
n Subtract/Divide the same term => Not Valid n Check programmed exercise 3.1, 3.2,…,3.5 for
practice