You are on page 1of 10

OptimizedImplementationofLogicFunctions:

Foragiventerm,eachappearanceofavariable(in
For a given term each appearance of a variable (in
trueorcomplementedform)iscalledaliteral
xyz=>threeliterals
abcd=>fourliterals
Any1orgroupof1sthatcanbecombinedonaKmaprepresentsan
implicantofafunction
Animplicantisaprimeimplicantifitcannotbe
combined with another implicant to remove a
combinedwithanotherimplicanttoremovea
variable
Acollectionofimplicantsthataccountofall
valuationsforwhichagivenfunctionis1iscalleda
coverofthatfunction
f th t f ti
Costisthenumberofgatesplusthetotalnumberof
inputstoallgatesinthecircuit
ExampleImplicants:allsingle1s,ac,abc,abd,abd
PrimeImplicants:ac,abd,abd,bcd
f(a,b,c,d)min:ac+abd+abd

Thus,aminimumSOPformcontainsonly(butnotnecessarilyall)primeimplicants.

Primeimplicantsdistinctions
Essential:neededtoformaminimumsolution
Nonessential:notnecessarilyneededtoformaminimumsolution

Allprimeimplicants:bd,abc,abc,acd,acd
Essentialprimes:bd,abc,abc
Nonessentialprimes:acd,acd
f(a,b,c,d)min:bd+abc+abc

Minimumcontainsallessentialandpossiblysomenonessentialprimes
Primeimplicantsexample

Essentialprimes:ac,acd
Nonessentialprimes:abd,bcd

Oneofthesemustbeincludedtoformaminimumsolution

Identifyallprimeimplicantsforthegiventruthtable.
Whichareessentialandwhicharenonessential?Whatis
a minimum SOP expression for this function?
aminimumSOPexpressionforthisfunction?
Incompletelyspecifiedfunctions
Indigitalsystemsitoftenhappensthatsomeinputconditions(i.e.someinput
valuations)canneverhappen
Aninputcombinationthatcanneverhappenisreferredtoasadontcarecondition
Asacircuitisdesigned,adontcareconditioncanbeignored(i.e.theoutputfor
thatconditioncanbetreatedas0or1inthetruthtable)
A function that has donttcarecondition(s)issaidtobeincompletelyspecified
Afunctionthathasdon care condition(s) is said to be incompletely specified

Assumeforathreevariablefunctionf(x,y,z)thattheinputcombination
xy=01neveroccurs,otherwisethefunctionism(0,1,4,5)

f(x,y,z)=m(0,1,4,5)+D(2,3)
f(x,y,z)=M(6,7)D(2,3)
( ,y, ) ( , ) ( , )
Multipleoutputcircuits

Inallpreviousexampleswehaveconsideredonlysingleoutputfunctions
In all previous examples we have considered only single output functions
Inpractice,thesefunctionsmaybepartofsomelargercircuitthathasmanysuchfunctions
Circuitsthatimplementthesefunctionsmaybecombinedintoalesscostlysinglecircuit
withmultipleoutputsbysharingsomegatesneededintheimplementationofthesingle
function

costignoresNOTgates
Inthiscase,theminimumcombinedcircuitwasderivedfromthe
minimumcircuitforeachfunction(f1andf2)
This will not always be the case
Thiswillnotalwaysbethecase.
Considertwofunctionsf3andf4.
Inthiscase,theminimumcombinedcircuitwasderivedfromtheminimum
circuitforeachfunction(f1andf2)
Thiswillnotalwaysbethecase.
Considertwofunctionsf3andf4.

Inputs: 21,
Gate:8
Cost=29

Inputs: 17,
17
Gate:6
Cost=23
Multilevel NAND and NOR Circuit

X1

x1 x2

x2
x1

(a) Sum-of-products implementation


g x1 x2

x1
x2

(c) Optimal NAND gate implementation

x1 x2

x2

(b) NAND gate implementation


x1
x2
x3
x4 f
x5
x6
x7
(a) Circuit with AND and OR gates
x1
x2
x3
x4 f
x5
x6
x7
(b) Inversions needed to convert to NANDs
x1

x2
x3
x4 f
x5

x6
x7
(c) NAND-gate circuit

Conversion to a NAND-gate circuit.


x1
x2
x3
x4 f
x5
x6
x7
(a) Inversions needed to convert to NORs

x1
x2

x3
f
x4

x5
x6
x7

(b) NOR-gate circuit

Conversion to a NOR-gate circuit.

You might also like