ece 331 – digital system design boolean algebra (lecture #3) the slides included herein were taken...

30
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6 th Edition, by Roth and Kinney, and were used with permission from Cengage Learning.

Upload: todd-hudson

Post on 19-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

ECE 331 – Digital System Design

Boolean Algebra

(Lecture #3)

The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6th Edition, by Roth and Kinney,

and were used with permission from Cengage Learning.

Page 2: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 2

Boolean Algebra George Boole developed an algebraic description for

processes involving logical thought and reasoning. Became known as Boolean Algebra

Claude Shannon later demonstrated that Boolean Algebra could be used to describe switching circuits.

Switching circuits are circuits built from devices that switch between two states (e.g. 0 and 1).

Switching Algebra is a special case of Boolean Algebra in which all variables take on just two distinct values

Boolean Algebra is a powerful tool for analyzing and designing logic circuits.

Page 3: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 3

Boolean Algebra and Expressions

A logic function can be represented by a Boolean expression (i.e. equation) Truth table Circuit diagram

A Boolean expression is composed of logic operations and literals

where the logic operations are represented by logic gates in the circuit diagram

and the literals are represented by the inputs to the logic gates.

Page 4: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 4

Boolean Algebra and Expressions

Boolean algebra can be used to manipulate or simplify Boolean expressions.

Why is this useful?

Page 5: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 5

Boolean Algebra and Expressions

Manipulating a Boolean expression (using Boolean algebra) results in an alternate expression that is functionally equivalent to the original.

The circuit diagram corresponding to the new expression may be

Easier to build (due to the logic gates required) than the circuit diagram corresponding to the original expression.

More cost effective than the circuit diagram corresponding to the original expression.

Page 6: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 6

Boolean Algebra and Expressions

Simplifying a Boolean expression (using Boolean algebra) results in an expression with fewer logic operations and/or fewer literals than the original.

The two expressions are functionally equivalent.

The circuit diagram corresponding to the new expression will be

More cost effective than the circuit diagram corresponding to the original expression.

Page 7: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 7

Basic Laws and Theorems

Commutative Law A + B = B + A A.B = B.AAssociative Law A + (B + C) = (A + B) + C A . (B . C) = (A . B) . CDistributive Law A.(B + C) = AB + AC A + (B . C) = (A + B) . (A + C)Null Elements A + 1 = 1 A . 0 = 0Identity A + 0 = A A . 1 = A

A + A = A A . A = AComplement A + A' = 1 A . A' = 0Involution A'' = AAbsorption (Covering) A + AB = A A . (A + B) = ASimplification A + A'B = A + B A . (A' + B) = A . B

(A + B)' = A'.B' (A . B)' = A' + B'Logic Adjacency (Combining) AB + AB' = A (A + B) . (A + B') = AConsensus AB + BC + A'C = AB + A'C (A + B) . (B + C) . (A' + C) = (A + B) . (A' + C)

Idempotence

DeMorgan's Rule

Page 8: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 8

Basic Laws and TheoremsOperations with 0 and 1:1. X + 0 = X 1D. X • 1 = X2. X + 1 = 1 2D. X • 0 = 0 Idempotent laws:3. X + X = X 3D. X • X = X Involution law:4. (X')' = X Laws of complementarity:5. X + X' = 1 5D. X • X' = 0 

Page 9: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 9

Basic Laws and TheoremsCommutative laws:6. X + Y = Y + X 6D. XY = YX Associative laws:7. (X + Y) + Z = X + (Y + Z) 7D. (XY)Z = X(YZ) = XYZ = X + Y + Z Distributive laws:8. X(Y + Z) = XY + XZ 8D. X + YZ = (X + Y)(X + Z)  Simplification theorems:9. XY + XY' = X 9D. (X + Y)(X + Y') = X10. X + XY = X 10D. X(X + Y) = X11. (X + Y')Y = XY 11D. XY' + Y = X + Y

Page 10: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 10

Basic Laws and Theorems

DeMorgan's laws:12. (X + Y + Z +...)' = X'Y'Z'...12D. (XYZ...)' = X' + Y' + Z' +...  Duality:13. (X + Y + Z +...)D = XYZ... 13D. (XYZ...)D = X + Y + Z +...  Theorem for multiplying out and factoring:14. (X + Y)(X' + Z) = XZ + X'Y 14D. XY + X'Z = (X + Z)(X' + Y)  Consensus theorem:15. XY + YZ + X'Z = XY + X'Z15D. (X + Y)(Y + Z)(X' + Z) = (X + Y)(X' + Z)

Page 11: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 11

Distributive LawUsing a truth table, it is easy to show that the distributive law is valid:

In addition to the ordinary distributive law, a second distributive law is valid for Boolean algebra, but not for ordinary algebra:

Proof of the second distributive law follows:

Page 12: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 12

Multiplying Out

The two distributive laws are used to multiply out an expression to obtain a Sum-of-Products (SOP) form.

An expression is said to be in SOP form when all products are the products of single variables.

A SOP expression is realized using one or more AND gates feeding a single OR gate.

Page 13: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 13

Multiplying Out

Examples of Boolean expression in SOP:

F1(A,B,C) = A'BC + ABC' + A'B'C' + ACF2(A,B,C) = ABC + A'B'C' + B'C

Examples of Boolean expressions not in SOP:

F3(A,B,C) = A'.(B+C) + A.B' + A.B.C

Page 14: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 14

Factoring

The two distributive laws can be used to factor an expression to obtain a Product-of-Sums (POS) form.

An expression is said to be in POS form when all sums are the sums of single variables.

A POS expression is realized using one or more OR gates feeding a single AND gate.

Page 15: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 15

Factoring

Examples of Boolean expression in POS:

F1(A,B,C) = (A'+B+C).(A+B'+C').(A+B+C).(A'+B')F2(A,B,C) = (A+B+C').(A'+B'+C).(B'+C')

Examples of Boolean expressions not in POS:

F3(A,B,C) = (A'.B+C).(A'+B').(A+B'+C')

Page 16: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 16

Simplification TheoremsThe following theorems are useful in simplifying Boolean expressions:

Page 17: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 17

Simplifying a Logic CircuitF = A(A’ + B)

By Theorem (2-14), (X + Y’)Y = XY, the expression F simplifies to AB.

Which circuit is cheaper?

Page 18: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 18

Boolean Algebra

Example:

Using Boolean Algebra, simplify the following Boolean Expression:

F = A'.B.C + A'

Page 19: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 19

Boolean Algebra

Example:

Using Boolean Algebra, simplify the following Boolean Expression:

F = (A + B'C + D + EF)(A + B'C + (D + EF)')

Page 20: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 20

Boolean Algebra

Exercise:

Using Boolean Algebra, simplify the following Boolean Expression:

F = (AB + C)(B'D + C'E') + (AB + C)'

Page 21: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 21

Boolean Algebra

Exercise:

Using Boolean Algebra, simplify the following Boolean expression.

F(A,B,C) = A'.B.C + A.B'.C + A.B.C

Page 22: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 22

DeMorgan's Laws

Can be stated as follows: The complement of the product (AND) is the

sum (OR) of the complements. (X.Y)' = X' + Y'

The complement of the sum (OR) is the product (AND) of the complements.

(X + Y)' = X' . Y'

Easily generalized to n variables. Can be proven using a Truth table

Page 23: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 23

Proving DeMorgan's Law

(X . Y)' = X' + Y'

Page 24: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 24

x 1

x 2

x 1

x 2

x 1

x 2

x 1

x 2

x 1

x 2

x 1

x 2

x 1 x 2 x 1 x 2 + = (a)

x 1 x 2 + x 1 x 2 = (b)

DeMorgan's Laws

Page 25: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 25

DeMorgan's Laws

Example:

Using DeMorgan's Laws, find the complement of the following Boolean Expression:

F = (A' + B).C'

Page 26: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 26

DeMorgan's Laws

Exercise:

Using DeMorgan's Laws, find the complement of the following Boolean Expression:

F = (AB' + C).D' + E'

Page 27: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 27

Duality

Given an expression, the dual is formed by replacing AND with OR, OR with AND, 0 with 1, and 1 with 0.

Variables and complements are left unchanged.

The dual of AND is OR and the dual of OR is AND:

(XYZ ...)D = X + Y + Z + ...

(X + Y + Z + ...)D = XYZ ...

Page 28: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 28

Duality

The dual of an expression may be found by complementing the entire expression and then complementing each of the individual variables.

For example:

(AB' + C)' = (AB')'.C' = (A' + B).C'

Therfore, (AB' + C)D = (A + B').C

complement expressioncomplement individual variables

Page 29: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 29

Boolean Algebra

Exercise:

For the following Boolean expression

F(A,B,C) = ABC + A'BC + AB'C + ABC'

1. Using Boolean algebra, simplify the Boolean expression.2. Derive the Truth table for the simplified expression.3. Confirm that the Truth table is also valid for the original expression.4. Draw the circuit diagram for the “cheaper” expression.

Page 30: ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic

Fall 2010 ECE 331 - Digital System Design 30

Questions?