15
ECE2030 Introduction to Computer Engineering Lecture 5: Boolean Algebra Prof. Hsien-Hsin Sean Lee Prof. Hsien-Hsin Sean Lee School of Electrical and Computer School of Electrical and Computer Engineering Engineering Georgia Tech Georgia Tech

ECE2030 Introduction to Computer Engineering Lecture 5: Boolean Algebra

  • Upload
    alaire

  • View
    41

  • Download
    0

Embed Size (px)

DESCRIPTION

ECE2030 Introduction to Computer Engineering Lecture 5: Boolean Algebra. Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Tech. What is Boolean Algebra. An algebra dealing with Binary variables by alphabetical letters Logic operations: OR, AND, XOR, etc - PowerPoint PPT Presentation

Citation preview

Page 1: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

ECE2030 Introduction to Computer Engineering

Lecture 5: Boolean Algebra

Prof. Hsien-Hsin Sean LeeProf. Hsien-Hsin Sean Lee

School of Electrical and Computer EngineeringSchool of Electrical and Computer Engineering

Georgia TechGeorgia Tech

Page 2: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

2

What is Boolean Algebra• An algebra dealing with

– Binary variables by alphabetical letters– Logic operations: OR, AND, XOR, etc

• Consider the following Boolean equation

ZZYYXZ)Y,F(X,

• A Boolean function can be represented by a truth table which list all combinations of 1’s and 0’s for each binary value

Page 3: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

3

Fundamental Operators• NOT

– Unary operator– Complements a Boolean variable represented

as A’, ~A, or Ā

• OR– Binary operator– A “OR”-ed with B is represented as A + B

• AND– Binary operator– A “AND”-ed with B is represented as AB or A·B– Can perform logical multiplication

Page 4: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

4

Binary Boolean Operations

• All possible outcomes of a 2-input Boolean function

A B F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15

0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1

1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

A·B AB

A+B Identity

A

B

ĀBA+B

AB

A·B

NULL

Page 5: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

5

Precedence of Operators• Precedence of Operator Evaluation (Similar

to decimal arithmetic)– () : Parentheses– NOT– AND– OR EBA)DCB(AF

Page 6: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

6

Function Evaluation

EBA)DCB(AF

ABCDE=00000

0011011)00(0

010)010(0000)000(0F

ABCDE=10000

1001110)00(1

010)010(1001)000(1F

Page 7: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

7

Basic Identities of Boolean Algebra

Theorem) (Consensus ZXXYYZZXXY

ation)(Simplific YXYXX

Law)n (Absorptio XXYX

Law) s(DeMorgan' YX YX

ive)(Distribut XZXY Z)X(Y

ve)(Associati ZY)(X Z)(YX

ve)(Commutati X Y Y X

Law)n (Involutio XX

t)(Complemen 1XX

Law)t (Idempoten XXX

11X

(Identity) X0X

Page 8: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

8

Derivation of Simplification

YXX

YXY)(1X

YXXYX

)YX(XX

YXYXX

YX

Page 9: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

9

Derivation of Consensus Theorem

YZZXXY

)X(XYZZXXY

YZXXYZZXXY

Y)Z(1XZ)XY(1

ZXXYYZZXXY

ZXXY

Page 10: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

10

Duality Principle• A Boolean equation remains valid if

we take the dual of the expressionsdual of the expressions on both sides of the equals sign

• Dual of expressions – Interchange 1’s and 0’s– Interchange AND () and OR (+)

Page 11: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

11

Duality PrincipleX1X X0X

00X 11X

0XX 1XX

XYYX XYYX

XXX XXX

Z)(XY)(XZYX XZXYZ)X(Y

YXYX YXYX

XY)(XX X YXX

YXY)X(X YX YXX

Z)XY)((XZ)Z)(YXY)((X ZXXY YZZXXY

Page 12: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

12

Simplification Examples

?XZZYXYZXF (1)

?YXZXYF (2)

?EDCBADCBACBABAAF (3)

C)(B A

)CBC)((BA BC)CBA( Prove (4)

Page 13: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

13

DeMorgan’s Law

BABA

BABA

Page 14: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

14

Example in Lecture 4

BCAF

BC)A(F

A

C

B

A C

B

Vdd

F

Page 15: ECE2030  Introduction to Computer Engineering Lecture 5: Boolean Algebra

15

Another Way to Draw It

BCAF

B)C(AF

A

C

B

A C

B

Vdd

F