• No results found

CH3 Boolean Algebra (cont d)

N/A
N/A
Protected

Academic year: 2021

Share "CH3 Boolean Algebra (cont d)"

Copied!
27
0
0

Loading.... (view fulltext now)

Full text

(1)

CH3 Boolean Algebra (cont

CH3 Boolean Algebra (cont d) d)

Lecturer:吳安宇 Date:2005/10/7

(2)

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

(3)

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

(4)

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

(5)

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)

(6)

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’

(7)

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’

(8)

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)

(9)

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’

(10)

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)

(11)

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

(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)

(13)

Consensus Theorem Consensus Theorem

vApplication to eliminate redundant terms from Boolean Expressions

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

(14)

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’

(15)

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’

(16)

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)

(17)

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)

(18)

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

(19)

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’

(20)

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

(21)

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

(22)

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

(23)

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

(24)

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’

(25)

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

(26)

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

(27)

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

References

Related documents

The sub-topics representing the Activity Theory categories in the questionnaire are: expectations of how students learn to teach science, the perceptions about a good

Throughout the space a playful but practical rhythm of Livistona australis (Cabbage Tree Palm) emerge from the paving with associated seating that creates a plaza that complements

This plan provides the strategic direction to ensure that the Wildfire Management Branch contributes to the Ministry of Forests, Lands and Natural Resource Operations vision

c) More likely to return to baseline functioning between episodes (BD II> BD I) d) Cyclothymic temperament (BD II > BD I).. 8) Which is NOT true in the differential

First, it examines the sharing mechanisms that firms provide from the national and global perspectives; second, it takes a closer look at the new opportunities and challenges

building4jobs.com Building Virtual Careers Building Webinars BD BD Magazine BD Supplements BD Special Features BD Global BD WA100 bdonline.co.uk bd4jobs.com BD Virtual Careers

building4jobs.com Building Virtual Careers Building Webinars BD BD Magazine BD Supplements BD Special Features BD Global BD WA100 bdonline.co.uk bd4jobs.com BD Virtual Careers

Draw the corresponding truth table that produces 1 only when all the doors are closed. Determine