Top Banner
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra (cont CH3 Boolean Algebra (cont d) d) Lecturer:吳安宇 Date2005/10/7
27

CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Mar 18, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

CH3 Boolean Algebra (contCH3 Boolean Algebra (cont’’d)d)

Lecturer:吳安宇

Date:2005/10/7

Page 2: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 2

IntroductionIntroductionv Today, you’ll know:

1. Guidelines for multiplying out/factoring expressions2. Exclusive-OR and Equivalence operations3. Positive logic and negative logic4. More about consensus theorem5. Algebraic simplification of switching expressions6. Approach to prove validity of an equation7. The difference between ordinary algebra and

Boolean algebra

Page 3: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 3

Guidelines for Multiplying Out and Guidelines for Multiplying Out and FactoringFactoring

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 termsvFor factoring, apply (1), (2), (3) from right terms to

left terms

Page 4: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 4

Multiplying Out ExpressionMultiplying Out Expression

EX. F = (Q + AB)(C’D + Q’) = QC’D + Q’ABor 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)

=> By brute force => 162 terms

Distributed Law

Page 5: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 5

Factoring ExpressionFactoring 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)

Page 6: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 6

3.2 Exclusive3.2 Exclusive--OR OperationsOR OperationsvExclusive-OR (XOR)

X Y X Y0 00 11 01 1

0110

Truth TableSymbol

Boolean Expression : X Y = X’Y + XY’

Page 7: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 7

ExclusiveExclusive--OR OperationsOR 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’

Page 8: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 8

Proof of Distributive LawsProof of Distributive LawsvXY XZ = XY(XZ)’ + (XY)’XZ

= XY(X’ + Z’) + (X’ + Y’)XZ= XYZ’ +XY’Z= X(YZ’ + Y’Z)= X(Y Z)

Page 9: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 9

Equivalence Operations Equivalence Operations (Exclusive NOR)(Exclusive NOR)

X Y X Y (X Y)’0 00 11 01 1

1001

1001

X Y = XY + X’Y’

Page 10: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 10

Simplification of XOR and XNORSimplification of XOR and XNORvX 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)

Page 11: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 11

3.3 Consensus Theorem3.3 Consensus TheoremXY + 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

Page 12: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 12

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)

Page 13: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 13

Consensus TheoremConsensus TheoremvApplication to eliminate redundant terms from

Boolean Expressions

a’b’ + ac + bc’ + b’c +ab = a’b’ + ac + bc’

Page 14: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 14

Consensus TheoremConsensus Theorem

Example (others are on p.67) :

(a + b + c’)(a + b + d’)(b + c + d’)= (a + b + c’)(b + c + d’)

n Simplification of Boolean Expression can reduce the cost of realizing the network using gates

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’

Page 15: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 15

Algebraic Simplification of Switching Algebraic Simplification of Switching ExpressionExpression

vA. Combining TermsXY + 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’

Page 16: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 16

Algebraic Simplification of Switching Algebraic Simplification of Switching ExpressionExpression

vRule B -- Eliminating Terms : X + XY = XXY + 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)

Page 17: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 17

Algebraic Simplification of Switching Algebraic Simplification of Switching ExpressionExpression

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)= A’B + BCD’ + A’C’D’ (final terms)

Page 18: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 18

Algebraic Simplification of Switching Algebraic Simplification of Switching ExpressionExpression

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

Page 19: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 19

Algebraic Simplification of Switching Algebraic Simplification of Switching ExpressionExpression

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’

Page 20: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 20

Algebraic Simplification of Switching Algebraic Simplification of Switching ExpressionExpression

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 literalsn Systematic way is presented in Ch.5 & CH.6

Page 21: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 21

Proving Validity of an EquationProving Validity of an Equation

vApproach : vConstruct a Truth TablevManipulate one side of the equation till it’s

identical to the other sidevReduce both sides independently to the same

equationv(a) Perform same operation on both sides

(b) Cannot Subtract or Divide both sides(Subtraction, Division NOT defined)

Page 22: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 22

Proving Validity of an EquationProving Validity of an Equation

vUsually :vReduce both sides to Sum of Products (SOP)vCompare both sidesvTry to Add or Delete terms by using Theorems

Page 23: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 23

Proving Validity of an EquationProving Validity of an EquationvEX.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

= AD + BC’D’ + A’BC

1 2 31 + 2 1 + 3 2 + 3

Page 24: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 24

Proving Validity of an EquationProving 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

nReducing 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’

= ABC + A’C’D’ + BC’D

Page 25: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 25

Proving Validity of an EquationProving 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’DnBecause both sides were independently reduced

to the same expression, the original equation is valid

Page 26: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 26

Boolean Algebra & Ordinary AlgebraBoolean Algebra & Ordinary AlgebravBoolean Algebra ≠ Ordinary AlgebraEX.1 X + Y = X + Z => Y = Z (?)

X = 1, Y = 0 => 1 + 0 = 1 + 1But 0 ≠ 1

EX.2 “If XY = XZ then Y = Z”True : when X ≠ 0False : when X = 0

Page 27: CH3 Boolean Algebra (cont d)access.ee.ntu.edu.tw/course/logic_design_94first/LectureNotes/CH03... · ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CH3 Boolean Algebra

Graduate Institute of Electronics Engineering, NTU

pp. 27

Boolean Algebra & Ordinary AlgebraBoolean 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 => Validn Subtract/Divide the same term => Not Valid

n Check programmed exercise 3.1, 3.2,…,3.5 for practice