You are on page 1of 60

ECE171 DigitalCircuits

Prof.MarkG.Faust MaseehCollegeofEngineering andComputerScience

Lecture5
Topics
CanonicalorStandardFormsofFunctions
SOP(SumofProducts)form POS(ProductofSums)form RelationshipBetweenMinTerms andMaxTerms ConvertingBetweenCompactFormsofFunctions

Minimizing(Reducing)Functions
Karnaugh Maps(Kmaps) Producttermsharing
2

ObtainingaBooleanEquation
InEcotopia itsgenerallyillegaltouseacarpoollaneduringweekdaysifthecardoesnt haveatleasttwooccupants.However,hybridvehiclescanusethelanesanytime regardless dl of fthe h number b of foccupants.S SUVs( (evenwith i htwoormoreoccupants) )arenever allowedtousethecarpoollanes(unlesstheyarealsohybrids). WriteaBooleanexpressioninSOPformforF(W,O,S,H)whichis1ifthecarispermittedto usethecarp poollanetoday. y Wis1iftoday yisaweekday. y Ois1iftherearetwoormore occupants,Sis1ifthevehicleisanSUV,His1ifthevehicleisahybrid.
W O S H F ---------0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1

DerivingBooleanEquations
X 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 F 0 0 0 1 1 0 1 0

Atruthtableisacomplete, unambiguousdefinitionofa Booleanfunction But B thow h d doweget taB Boolean l expressionfromatruthtable?


SOPorPOS
F = XYZ + XYZ + XYZ
4

ObtainingSOPFormsofFunctions
F(A,B) = F(0,0)AB + F(0,1)AB + F(1,0)AB + F(1,1)AB = 0AB + 1AB + 1AB + 1AB = 0 + AB + AB + AB = AB + AB + AB A B F(A,B)
0 Canonical or Standard Standard Product Term 0 SOP Form (Minterm) 1 1 Reduced Form A+B 0 1 0 1 0 = F(0,0) 1 = F(0,1) 1 = F(1,0) 1 = F(1,1)
5

OR truth table

Minterms

CompactMintermForm
F(A B) = F(0 F(A,B) F(0,0) 0)AB + F(0,1) F(0 1)AB + F(1,0) F(1 0)AB + F(1,1) F(1 1)AB = 3i=0 (Fi mi)

= 0 m0 + 1 m1 + 1 m2 + 1 m3 = m1 + m2 + m3 A B = m(1,2,3) m(1 2 3) 0 0 = (1,2,3)


0 1 1 1 0 1

F(A,B) 0 = F(0,0) 1 = F(0 F(0,1) 1) 1 = F(1,0) 1 = F(1,1)


7

OR truth table

Minterms

(3,5,6,7)

GeneralizedCompactMintermForm
F(X1, X2, Xn) = (minterms for 1s of the function) F(X1, X2, Xn) = (minterms for 0s of the function)

ObtainingPOSFormsofFunctions
F(A,B) = (F(0,0) + A + B) (F(0,1) + A + B) ( (F(1,0) ( ) + A + B) )( (F(1,1) ( ) + A + B) ) = (0 + A + B) (0 + A + B) (0 + A + B) (1 + A +B) = (A+B) (A+B) (A+B) (1) AND t truth th t table bl = (A+B) (A+B) (A+B)
A 0 Canonical or Standard POS Form Standard Sum Term 0 (Maxterm) 1 Reduced Form B 0 1 0 1 F(A,B) 0 = F(0,0) 0 = F(0,1) 0 = F(1,0) 1 = F(1,1)
10

A B

Maxterms

11

CompactMaxtermForm
F(A,B) = (F(0,0) + A + B) (F(0,1) + A + B) ( (F(1,0) ( ) + A + B) )( (F(1,1) ( ) + A + B) ) = 3i=0 (Fi + Mi) = (0 + M0) (0 + M1) (0 + M2) (1 + M3) = M0 M1 M2 AND truth table = M(0,1,2) A B F(A,B) = (0,1,2) (0 1 2)
0 0 1 1 0 1 0 1 0 = F(0,0) 0 = F(0,1) F(0 1) 0 = F(1,0) 1 = F(1,1) F(1 1)
12

Maxterms

(0,1,2,4)

13

GeneralizedCompactMaxtermForm
F(X1, X2, Xn) = (maxterms for 0s of the function) F(X1, X2, Xn) = (maxterms for 1s of the function)

14

RelationshipBetweenMinterms andMaxterms
mi =Mi,Mi =mi = , =

15

Anexample:Giventheaccompanyingtruthtable,writethe compact p minterm formforFforits1sand0s.Writethe standardSOPformforeach. Compactminterm form1s: X 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 F 0 0 0 1 1 0 1 0 F = (3,4,6) CorrespondingSOP form: F = XYZ + XYZ + XYZ Compactminterm form0s: F = (0,1,2,5,7) CorrespondingSOPform: F = XYZ + XYZ + XYZ + XYZ + XYZ
16

Anexample:Giventheaccompanyingtruthtable,writethe compact p maxtermformforFforits1sand0s.Writethe standardPOSformforeach. Compact maxterm form 1s: X 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 F 0 0 0 1 1 0 1 0 F = (3,4,6) Corresponding POS form: F = (X+Y+Z) (X+Y+Z) (X+Y+Z) Compact maxterm form 0s: F = (0,1,2,5,7) Corresponding POS form: F = (X+Y+Z) (X+Y+Z) (X+Y+Z) (X+Y+Z) (X+Y+Z)
17

FunctionMinimization:Reduce NumberofLiteralsandTerms
SimplifyforComprehension ReduceNumberofComponents ReduceAmountofWiring/Routing S ll Ci Smaller Circuit/Board i /B dArea A LowerCost HigherReliability
18

FunctionMinimization:Reduce NumberofLiteralsandTerms
ApplyBooleanAlgebra Employ p yComputer p Algorithm g
QuineMcCluskeytabularalgorithm Boozer McBoole EspressoandEspresso/Exact(CADpackages)

SystematicAlgebraicReduction(SAR) Karnaugh g Maps p ( (KMaps) p)


19

Karnaugh(K)Maps
AgraphicalrepresentationofBooleanfunction Easytoperformfunctionalreduction Reliesonadjacency(Graycode)ofminterms
Adj Adjacent t(h (horizontal/vertical i t l/ ti l&wraparound) d)cells ll differinonlyonevariable(complement)

Number N b form f and d V Variable i bl f form

20

KMaps
2VariableKMap(NumberForm)

Gray code! Minterm numbers

21

KMaps
3VariableKMap(NumberForm)

Gray code! Minterm numbers

22

KMaps
4VariableKMap(NumberForm)

Gray code! Minterm numbers

23

KMaps
2VariableKMap(VariableForm)

May be more useful if plotting partially reduced functions

C f l! Preserve Careful! P Gray G code! d !

24

KMaps
3VariableKMap(VariableForm)

25

KMaps
4VariableKMap(VariableForm)

26

MyPreference Preference
Y Y

W X W

27

PlottingFunctionsinKMaps
Plot the function F1(X,Y,Z) = (2,5,6,7) X 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 F1 0 0 1 0 0 1 1 1
28

PlottingFunctionsinKMaps
Plot the function F2(A,B,C,D) = (6,7,8,14,15) Plot 0s!

29

Dont Don tCareOutputs


BCD A B C D Prime 0 1 1 1 0 1 0 1 0 0 X X X X X X
30

OutputofFunctionDoesntMatter
Typically yp yimpossible p input p condition UseXinsteadof0or1

0 1 2 3 4 5 6 7 8 9 . . . . . .

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

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

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

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

DontCareOutputs CompactMintermandMaxterm Form


F3(A,B,C)=(2,6)+md(3,5,7) F3(A B C)=(0,1,4) F3(A,B,C) (0 1 4)+md(3,5,7) (3 5 7) F3(A,B,C)=(0,1,4) Md(3,5,7) F3(A B C)=(2,6) F3(A,B,C) (2 6) Md(3,5,7) (3 5 7)
A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 F3 0 0 1 X 0 X 1 X
31

PlottingKMapswithXs
F3(A,B,C) = (2,6) + md(3,5,7)
A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 F3 0 0 1 X 0 X 1 X
32

PlottingKMapsfromfunctions inpartiallyreducedform
F4(A,B,C,D) = ABCD + BCD + AB + C p1 p2 p3 p4

33

PlottingKMapsfromfunctions inpartiallyreducedform
F4(A,B,C,D) = ABCD + ABCD + ABC r1 r2 r3

34

KMapsforfunctionsof5variables
F(V,W,X,Y,Z)
m0 through m15

m16 through g m31


35

KMapsforfunctionsof5variables
F(V,W,X,Y,Z) = (3,7,9,11,12,15,16,19,23,24,27,28,31) + md(4,18,20,26,30) ( )

36

UsingKMapstoReduceFunctions
Assume youve plotted the K-map for F(X,Y,Z) as follows:

37

UsingKMapstoReduceFunctions
You want to obtain a reduced expression for F(X,Y,Z) in SOP form

38

Using gKMaps p toReduceFunctions


You want to obtain a reduced expression for F(X,Y,Z) in SOP form

Needtocover1s Fewestproductterms Simplestexpressions


(fewestvariables)

39

UsingKMapstoReduceFunctions
Circleallisolated0cubes Circleall1cubesnotcompletely containedinalargercube Continuefor2,3,4cubes Write W it th theproduct d tt terms( (prime i implicants)andORthemtogether Writetheexpressionforeachproduct term

40

UsingKMapstoReduceFunctions

F(X,Y,Z) = p1 + p2 + p3 = XZ + XZ + Y

41

UsingKMapstoReduceFunctions

F(X,Y,Z) = r1 + r2 = XYZ + XYZ

42

KMaps(SomeTerminology)
Implicant:Producttermofafunction PrimeImplicant:Producttermforacubewhichisnot completelycontainedinanothercube EssentialPrimeImplicant:Producttermwhichprovides theonlycoveringforagivenmintermandmustalwaysbe usedinthesetofp productterm OptionalPrimeImplicant:Producttermwhichprovides analternativecoveringforagivenmintermandmay be used din i the h setof fproduct d terms Redundant(NonEssential)PrimeImplicant:Productterm foracubewhichiscompletelycontainedinanothercube (correct,butwontleadtoaminimumfunction)
43

KMapwithonlyessentialprime implicants

44

KMapwithnoessentialprime implicants

45

KMapwithnoessentialprime implicants

46

KMapwithnoessentialprime implicants:alternative!

47

CoveringOrderisEssential

48

UsingKMapstoReduceFunctions
Given the following K-map, which minimum SOP form of the function has the smallest literal count (the one for the 1s or the 0s)?

F(W,X,Y,Z) = F(W X Y Z) = F(W,X,Y,Z)

49

UsingKMapstoReduceFunctions

lc = 6 F(W,X,Y,Z) = p1 + p2 + p3 = XZ + WZ + WY

50

UsingKMapstoReduceFunctions

lc = 7

F(W,X,Y,Z) = r1 + r2 + r3 = WXY + WZ + YZ

51

UsingKMapstoReduceFunctions
Given the following K-map, which minimum SOP form of the function has the smallest literal count (the one for the 1s or the 0s)?

F(W,X,Y,Z) = p1 + p2 + p3 = XZ + WZ + WY F(W,X,Y,Z) = r1 + r2 + r3 = WXY + WZ + YZ

lc = 6 lc = 7

52

UsingKMapstoReduceFunctions
Given the following K-map, which minimum SOP form of the function has the smallest literal count (the one for the 1s or the 0s)?

F(W,X,Y,Z) = F(W X Y Z) = F(W,X,Y,Z)


Only use dont cares to allow larger cube sizes to be covered

53

UsingKMapstoReduceFunctions
Only y use dont cares to allow larger cube sizes to be covered

lc = 10

F(W,X,Y,Z) = p1+p2+p3+p4 = XYZ + WXY + W + YZ


54

UsingKMapstoReduceFunctions
Only use dont cares to allow larger cube sizes to be covered

lc = 7

F(W,X,Y,Z) = r1 + r2 + r3 = WYZ+ XZ + WY

55

KMapsforfunctionsof5variables
F(V,W,X,Y,Z) = (3,7,9,11,12,15,16,19,23,24,27,28,31) + md(4,18,20,26,30) ( )

56

Ecotopia Revisited

57

CircuitswithMultipleOutputs ProductTermSharing
x1 x2 x3 x4 f1 f2

58

ProductTermSharing
MayResultinKMapsDifferentfromOptimizingSeparateFunctions

59

KMaps:Caveats!
EmptyKMapmustbeconstructedcorrectly
GrayCode:Adjacentcellsdifferinonlyonevariable

KMapmustbeplottedcorrectly
Mintermsfromtruthtableorcompactform Mintermsfrompartiallyreducedexpressions

KMapmustbecircledcorrectly
Startwithsmallestcubesfirst! RememberthatKMapswrapatedges

Use1sforF,0sforF
60

You might also like