boolean algebra and logic gates1 digital logic design by dr. fenghui yao tennessee state university...

33
Boolean Algebra and Logic Gates 1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN

Upload: adrian-stephens

Post on 21-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Boolean Algebra and Logic Gates 1

DIGITAL LOGIC DESIGN

by

Dr. Fenghui Yao

Tennessee State University

Department of Computer Science

Nashville, TN

Boolean Algebra and Logic Gates 2

DefinitionsDefinitions Switching networkSwitching network

One or more inputsOne or more inputs One or more outputsOne or more outputs

Two TypesTwo Types

CombinationalCombinational The output depends only on the The output depends only on the

present values of the inputspresent values of the inputs Logic gates are used Logic gates are used

SequentialSequential The output depends on present The output depends on present

and past input valuesand past input values

Boolean Algebra and Logic Gates 3

Boolean AlgebraBoolean Algebra

Boolean AlgebraBoolean Algebra is used to describe the is used to describe the relationship between inputs and outputsrelationship between inputs and outputs

Boolean Algebra Boolean Algebra is the logic is the logic mathematics used for understanding of mathematics used for understanding of digital systems digital systems

Network.

.

.

.

.

.

Inputs Outputs

Boolean Algebra and Logic Gates 4

Basic OperationsBasic Operations COMPLEMENT (INVERSE)

1 if 0 and 0 if 1

01 and 10''

''

AAAA

0 is low voltage

1 is high voltage

Boolean Algebra and Logic Gates 5

Basic OperationsBasic Operations AND

F is 1 if and only if

A and B are both 1

Boolean Algebra and Logic Gates 6

Basic OperationsBasic Operations OR

F is 1 if and only if

A or B (or both) are 1

Boolean Algebra and Logic Gates 7

Basic TheoremsBasic Theorems

Let’s prove each one

Boolean Algebra and Logic Gates 8

Simplification TheoremsSimplification Theorems

YXYXY

XYYYX

XYXX

XXYX

XYXYX

XXYXY

'

'

'

'

6.

)( 5.

)( 4.

3.

))(( 2.

1.

Boolean Algebra and Logic Gates 9

Proof 6. Proof 6.

R.H.S. = X+YR.H.S. = X+Y

= X(Y+Y’)+Y(X+X’)= X(Y+Y’)+Y(X+X’)

= XY+XY’+XY+X’Y= XY+XY’+XY+X’Y

= XY+XY’+X’Y= XY+XY’+X’Y

= (X+X’)Y+XY’= (X+X’)Y+XY’

= Y+XY’= Y+XY’

= L.H.S.= L.H.S.

Boolean Algebra and Logic Gates 10

Truth TableTruth Table

It can represent a boolean functionIt can represent a boolean function For possible input combinations it For possible input combinations it

shows the output value shows the output value There are rows (There are rows (nn is the number of is the number of

input variables)input variables) It ranges from 0 toIt ranges from 0 to

n2

12 n

Boolean Algebra and Logic Gates 11

ExamplesExamples

Show the truth table forShow the truth table for

YZXF '

Show the followings by constructing Show the followings by constructing truth tablestruth tables

))((

)(

ZXYXYZX

XZXYZYX

Boolean Algebra and Logic Gates 12

ExampleExample

Draw the network diagram forDraw the network diagram for

YZXF '

Boolean Algebra and Logic Gates 13

ExampleExample

Draw the network diagram forDraw the network diagram for'''' YXZXYXYZF

Boolean Algebra and Logic Gates 14

Operator PrecedenceOperator Precedence

ParenthesisParenthesis NOTNOT ANDAND OROR

Boolean Algebra and Logic Gates 15

InversionInversion

'''

'''

)(

)(

YXXY

YXYX

Prove with the truth tables…

''2

'1

'21

''2

'1

'21

...)...(

...)...(

nn

nn

XXXXXX

XXXXXX

The complement of the product is the sum of the The complement of the product is the sum of the complementscomplements

The complement of the sum is the product of the The complement of the sum is the product of the complementscomplements

Boolean Algebra and Logic Gates 16

ExamplesExamples

Find the complements ofFind the complements of

?))((

?])[(

?])[(

'''''

'''

'''

DBCA

EDCAB

CBA

Boolean Algebra and Logic Gates 17

Study ProblemsStudy Problems1. Draw a network to realize the following by using 1. Draw a network to realize the following by using

only one AND gate and one OR gateonly one AND gate and one OR gate

ABCFABCEABCDY

2. Draw a network to realize the following by using 2. Draw a network to realize the following by using two OR gates and two AND gatestwo OR gates and two AND gates

))()(( ZVYXVXWVF

3. Prove the following equations using truth table3. Prove the following equations using truth table

''

''

))((

))((

ACABCABCA

XYWZWWZXYW

Boolean Algebra and Logic Gates 18

Solution of problem 2Solution of problem 2

L.H.S.=(V+X+W)(V+X+Y)(V+Z)L.H.S.=(V+X+W)(V+X+Y)(V+Z)

=[(V+X)+W(V+X)+Y(V+X)+WY]=[(V+X)+W(V+X)+Y(V+X)+WY](V+Z)(V+Z)

=[(V+X)(1+W+Y)+WY](V+Z)=[(V+X)(1+W+Y)+WY](V+Z)

=(V+X+WY)(V+Z) =(V+X+WY)(V+Z)

This can be implemented by two OR This can be implemented by two OR gates and two AND gate.gates and two AND gate.

Boolean Algebra and Logic Gates 19

MintermsMinterms Consider variables Consider variables A A and and BB Assume that they are somehow combined Assume that they are somehow combined

with AND operatorwith AND operator There are 4 possible combinationsThere are 4 possible combinations

Each of those terms is called a minterm Each of those terms is called a minterm (standard product)(standard product)

In general, if there are n variables, there are In general, if there are n variables, there are mintermsminterms

'''' , , , BAABBAAB

n2

Boolean Algebra and Logic Gates 20

ExerciseExercise List the minterms for 3 variablesList the minterms for 3 variables

AA BB CC MintermMinterm DesignationDesignation00 00 00 A A ' ' B B ' ' CC''

00 00 11 A A ' ' B B ' ' CC

00 11 00 A A ' ' B CB C''

00 11 11 A A ' ' B CB C

11 00 00 A B A B ' ' CC''

11 00 11 A B A B ' ' CC

11 11 00 A B CA B C''

11 11 11 A B CA B C

0m

1m

2m

3m

4m

5m

6m

7m

Boolean Algebra and Logic Gates 21

MaxtermsMaxterms Consider variables Consider variables A A and and BB Assume that they are somehow combined with Assume that they are somehow combined with

OR operatorOR operator There are 4 possible combinationsThere are 4 possible combinations

Each of those terms is called a maxterm Each of those terms is called a maxterm (standard sums)(standard sums)

In general, if there are n variables, there are In general, if there are n variables, there are maxtermsmaxterms

'''' , , , BABABABA

n2

Boolean Algebra and Logic Gates 22

ExerciseExercise List the maxterm for 3 variablesList the maxterm for 3 variables

AA BB CC MaxtermMaxterm DesignationDesignation00 00 00 A+BA+B++CC

00 00 11 AA++BB++CC' '

00 11 00 AA++BB''+C+C

00 11 11 A+BA+B'+'+CC''

11 00 00 AA'+'+B+CB+C

11 00 11 AA''+B+C+B+C''

11 11 00 AA'+'+BB'+'+CC

11 11 11 AA'+'+BB'+'+CC''

0M

1M

2M

3M

4M

5M

6M

7M

Boolean Algebra and Logic Gates 23

ExampleExample Express Express FF in the sum of minterms and in the sum of minterms and

product of maxterms formatsproduct of maxterms formats

3,1,0

7,6,5,4,2

)())((

24567

''''''

'''''''

'''''

mmmmm

BCACABCABABCABC

BCAABCCABCABABCABC

BCAACCBBABCAF

'BCAF

Boolean Algebra and Logic Gates 24

Sum-of-ProductsSum-of-Products All products are the product of single All products are the product of single

variable onlyvariable only

EFCDBA

EDCBA

EACECDAB

)(

''

''''YES

YES

NO

Boolean Algebra and Logic Gates 25

Sum-of-ProductsSum-of-Products One or more AND gates feeding a One or more AND gates feeding a

single OR gate at the outputsingle OR gate at the output

'''' EACECDAB

A'BC

'DEA

'C'E

Boolean Algebra and Logic Gates 26

Product-of-SumsProduct-of-Sums All sums are the sums of single All sums are the sums of single

variablesvariables

EFDCBA

EDCAB

ECAEDCBA

))((

)(

))()((''

''''YES

YES

NO

Boolean Algebra and Logic Gates 27

Product-of-SumsProduct-of-Sums One or more OR gates feeding a single One or more OR gates feeding a single

AND gate at the outputAND gate at the output

))()(( '''' ECAEDCBA

A'BC

'DEA

'C'E

Boolean Algebra and Logic Gates 28

Logic Gates Logic Gates

BAF BAF

Boolean Algebra and Logic Gates 29

Exclusive-ORExclusive-OR

bothnot but 1or 11 BABA

'''''

'

'

)(

)(

)()(

1

0

1

0

BAABBABABA

ACABCBA

CBACBACBA

ABBA

AA

AA

AA

AA

Boolean Algebra and Logic Gates 30

EquivalenceEquivalence Equivalence is the complement of Equivalence is the complement of

exclusive-OR exclusive-OR

)(

))(()()(''

''''''

BABAAB

BABAABBABA

A

B)( BA

)()( '' ACBCBAF Simplify it…

Boolean Algebra and Logic Gates 31

Integrated CircuitsIntegrated Circuits

SSI (Small Scale)SSI (Small Scale) Less than 10 gates in a packageLess than 10 gates in a package

MSI (Medium Scale)MSI (Medium Scale) 10-1000 gates in a package10-1000 gates in a package

LSI (Large Scale)LSI (Large Scale) 1000s of gates in a single package1000s of gates in a single package

VLSI (Very Large Scale)VLSI (Very Large Scale) Hundred of thousands of gates in a single Hundred of thousands of gates in a single

packagepackage

Boolean Algebra and Logic Gates 32

Study ProblemsStudy Problems Course Book Chapter – 2 ProblemsCourse Book Chapter – 2 Problems

2 – 12 – 1 2 – 32 – 3 2 – 52 – 5 2 – 82 – 8 2 – 122 – 12 2 – 142 – 14

Boolean Algebra and Logic Gates 33

QuestionsQuestions