Académique Documents
Professionnel Documents
Culture Documents
Dr.A.Sahu
Dept of Comp. Sc. & Engg.
DeptofComp.Sc.&Engg.
IndianInstituteofTechnologyGuwahati
1
Out e
Outline
Review:DualityPrinciple
Moresgates:XOR,XNOR,NAND,NOR
Design
Minterm&SumofProduct
MaxTerm&ProductofSUM
Max Term & Product of SUM
Booleanfunction:Representation,Canonical
form
Karnough mapsimplification
map simplification
2
Principle of Duality
PrincipleofDuality
DualofastatementSisobtained
Byinterchanging*and+
By interchanging 0 and 1
Byinterchanging0and1
Byinterchangingforallxbyxalsovalid
(for an expression) only for simple
(foranexpression)onlyforsimple
demorgan law
Dualof(a*1)*(0+a)=0is(a+0)+(1*a)=1
D l f ( *1)*(0 ) 0 i ( 0) (1* ) 1
(a+b)=a*b
(a+b )*1=(a*b)+0
Duality examples
Dualityexamples
x+0=xx.1=x
X+x=1
x.x=0
A+BC
A.(B+C)
(
)
AB+AB
(A+B).(A+B)
Logic
Gates: XOR, XNOR
LogicGates:XOR,XNOR
XOR
XNOR
A
0
0
1
1
B
0
1
0
1
AXORB
0
1
1
0
AXNORB
0
0
1
1
0
1
0
1
1
0
0
1
Logic
Gates: NAND, NOR
LogicGates:NAND,NOR
NAND
NOR
A
0
0
1
1
B
0
1
0
1
ANANDB
1
1
1
0
A
0
0
1
B
0
1
0
ANORB
1
0
0
0
6
(XY)
((XY))=XY
(XY)=X+Y
(X+Y)
((X+Y))=X+Y
(X+Y)=XY
Multiinput
gate
Multi inputgate
X1
X2
X3
X1+X2+X3+ +Xn
X1+X2+X3++Xn
Xn
X1
X2
X3
X1.X2.X3..Xn
X
Xn
9
BooleanFunctions:Terminology
gy
F(a,b,c)=abc +abc+ab +c
Variable
Representsavalue(0or1),Threevariables:a,b,andc
Literal
Appearanceofavariable,intrueorcomplementedform
Nineliterals:a,b,c,a,b,c,a,b,andc
, , , , , , , ,
Productterm
Productofliterals,Fourproductterms:abc,abc,ab,c
p
Sumofproducts(SOP)
Aboveequationisinsumofproductsform.
F=(a+b)c+disnot.
RepresentationsofBooleanFunctions
English 1: F outputs 1 when a is 0 and b is 0
0, or when a is 0 and b is 1
1.
English 2: F outputs 1 when a is 0, regardless of bs value
(a)
a
a b F
b
0 0 1
F
Equation 1: F(a,b) = ab + ab
0 1 1
Equation 2: F(a,b) = a
a
1 0 0
(c)
(b)
1 1 0
Circuit 1
a
Truth table
(d)
Circuit 2
function F
Afunctioncanberepresentedindifferentways
AboveshowssevenrepresentationsofthesamefunctionsF(a,b),using
fourdifferentmethods:English,Equation,Circuit,andTruthTable
TruthTableRepresentationofFunctions
DefinevalueofFfor
eachpossible
p
combinationofinput
values
a
0
0
1
1
2
2inputfunction:4rows
input function: 4 rows
3inputfunction:8rows
4inputfunction:16
p
rows
Q:Usetruthtableto
define function F(a b c)
definefunctionF(a,b,c)
thatis1whenabc is5
orgreaterinbinary
b
0
1
0
1
a
0
0
0
0
1
1
1
1
(a)
b
0
0
1
1
0
0
1
1
c
0
1
0
1
0
1
0
1
(b)
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
F
0
0
0
0
0
1
1
1
a
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
b
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
c
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
(c)
d
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
ConvertingamongRepresentations
Canconvertfromany
representationtoanyother
Commonconversions
Inputs
a
b
0
0
0
1
1
0
1
1
Equationtocircuit
Truthtabletoequation
Equationtotruthtable
Equation to truth table
Easy justevaluateequationforeach
inputcombination(row)
Creatingintermediatecolumnshelps
a' b'
1
0
0
0
a' b
0
1
0
0
Output
F
1
1
0
0
Outputs
F
1
1
0
0
Term
F = sum of
ab
ab
a
b
F = ab
b + ab
b
Q: Convert to equation
a b c
F
0
0 0 0
0
0 0 1
0 1 0
0
0 1 1
0
1 0 0
0
1 0 1
1 abc
1 1 0
1 abc
abc
1 1 1
1 abc
StandardRepresentation:TruthTable
Howtodeterminetwofunctionsarethesame?
Usealgebraicmethods
Butifwefailed,doesthatprovenot
B t if
f il d d
th t
t equal?No.
l? N
Solution:Converttotruthtables
OnlyONEtruthtablerepresentationofgivensame
O l ONE t th t bl
t ti
f i
functions:Standardrepresentation
F = ab
b + a
a
0
0
1
1
b
0
1
0
1
F = ab
b +ab
b + ab
b
F
1
1
0
1
a
0
0
1
1
b
0
1
0
1
F
1
1
0
1
a
CanonicalForm SumofMinterms
Truthtablestoobigfornumerousinputs
T th t bl t bi f
i
t
Usestandardformofequationinstead
Knownascanonicalform
Known as canonical form
Regularalgebra:grouptermsofpolynomialbypower
ax2 +bx +c(3x2 +4x+2x2 +3+1>5x2 +4x+4)
Booleanalgebra:createsumofminterms
Boolean algebra: create sum of minterms
Minterm:producttermwitheveryfunctionliteralappearing
exactlyonce,intrueorcomplementedform
Justmultiplyoutequationuntilsumofproductterms
Thenexpandeachtermuntilalltermsareminterms
Standardforms(mayuselessgates)
Sumofproducts(SOP)
Productofsums(POS)
(
)
F = ab+a (already sum of products:SOP)
F = ab + a
a(b+b)
(b+b ) (expanding term)
F = ab + ab + ab (it is canonical form:SOM)
Canonical Forms
CanonicalForms
ItisusefultospecifyBooleanfunctionsin
p y
aformthat:
Allowscomparisonforequality.
p
q
y
Hasacorrespondencetothetruthtables
CanonicalFormsincommonusage:
Canonical Forms in common usage:
SumofMinterms (SOM)
ProductofMaxterms
Product of Maxterms (POM)
Minterms
productterm isatermwhereliteralsareANDed.
Example:xy,xz,xyz,
minterm :Aproductterminwhichallvariablesappear
exactlyonce,innormalorcomplementedform
Example:F(x,y,z)has8minterms
xyz,xyz,xyz,...
Functionwithnvariableshas2n minterms
Aminterm equals1atexactlyoneinputcombinationand
isequalto0otherwise
Example:xyz=1onlywhenx=0,y=0,z=0
Aminterm isdenotedasmi wherei correspondsthe
inputcombinationatwhichthisminterm isequalto1
2 Variable Minterms
2VariableMinterms
Twovariables(XandY)produce2x2=4
combinations
XY (bothnormal)
XY
(b th
l)
XY (Xnormal,Ycomplemented)
XY (Xcomplemented,Ynormal)
XY (bothcomplemented)
Maxterms
Maxterms areORtermswitheveryvariableintrue
y
orcomplementedform.
X+Y
(bothnormal)
X+Y
(xnormal,ycomplemented)
X+Y
(xcomplemented,ynormal)
X+Y (bothcomplemented)
Maxterms andMinterms
Twovariableminterms andmaxterms.
Index
0
1
2
3
Minterm
xy
xy
x y
xy
xy
Maxterm
x+y
x+y
xx+y
+y
x+y
Theindexaboveisimportantfordescribingwhich
variablesinthetermsaretrueandwhichare
complemented.
complemented
Minterms
p
Variablecomplementedif0
Variableuncomplemented if1
miindicatedtheith minterm
iindicatesthebinarycombination
miisequalto1forONLYTHATcombination
i
l t 1 f ONLY THAT
bi ti
Maxterms
Sumterm :AtermwhereliteralsareORed.
Example:x+y,x+z,x+y+z,
Maxterm :asumterminwhichallvariablesappear
exactlyonce,innormalorcomplementedform
Example:F(x,y,z)has8maxterms
(x+y+z),(x+y+z),(x+y+z),...
Functionwithnvariableshas2n maxterms
Amaxterm equals0atexactlyoneinputcombination
andisequalto1otherwize
Example:(x+y+z)=0onlywhenx=0,y=0,z=0
Amaxterm isdenotedasMi wherei correspondsthe
inputcombinationatwhichthismaxterm isequalto0
Maxterms
Variablecomplementedif1
p
Variablenotcomplementedif0
2,
2 5,
5 7)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
m0
m1
m2
m3
m4
m5
m6
m7
1
0
1
0
0
1
0
1
ExpressingFunctionswithMaxterms
Boolean function : Expressed algebraically from a
give truth table
i llogical
i l product
d ((AND)) off ALL the
h
By fforming
maxterms that produce 0 in the function
X
Y
Y
Z
M
F
FF
Example:
1
M0
0
0
0
0
Consider the function defined by the
0
M1
1
0
0
1
truth table
M2
1
0
1
0
0
F(X,Y,Z) = M(1,3,4,6)
0
M3
1
0
1
1
M4
1
0
0
0
1
Applying DeMorgan
M5
1
0
1
0
1
F = m1 + m3 + m4 + m6= m(1,3,4,6)
F
m(1 3 4 6) 1
M6
1
0
0
1
F = F = [m1 + m3 + m4 + m6]
M7
1
1
1
1
0
= m1.m3.m4.m6
Notetheindicesinthislistarethosethat
Note the indices in this list are those that
= M1.M3.M4.M6
aremissingfromthepreviouslistin
m(0,2,5,7)
= M(1,3,4,6)
SumofMinterms vs Productof
Maxterms
A function can be expressed algebraically as:
The sum of minterms
The product of maxterms
m(0,1,2,4,5),
m(0 1 2 4 5) and
E = M(3,6,7)
E=
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
m
m0
m1
m2
m3
m4
m5
m6
m7
M
M0
M1
M2
M3
M4
M5
M6
M7
E
1
1
1
0
1
1
0
0
Example (Cont.)
Example(Cont.)
Solution: Method2_a
E =Y
Y + X
XZ
Z
= Y(X+X)(Z+Z) + Z(Y+Y)
= (XY+XY)(Z+Z) + XYZ+
XZY
= YZ+XYZ+XYZ+XYZ+
XYZ+XZY
X
YZ +X Z Y
= m5 + m1 + m4 + m0 + m2 + m0
= m0 + m1 + m2 + m4 + m5
= m(0,1,2,4,5)
To find the form Mi, consider the
remaining indices
E = M(3,6,7)
Solution: Method2_b
E =Y
Y + X
XZ
Z
E = Y(X+Z)
= YX + YZ
= YX(Z+Z) + YZ(X+X)
= XYZ+XYZ+XYZ
E =
(X+Y+Z)(X+Y+Z)(X+Y+Z)
= M7 . M6 . M3
= M(3,6,7)
To find the form Smi, consider
the remaining indices
E = m(0,1,2,4,5)
Canonical Forms
CanonicalForms
The
Thesumofminterms
sum of minterms andtheproductof
and the product of
maxterms formsareknownasthecanonical
forms ofafunction.
of a function
Standard Forms
StandardForms
Sum
SumofProducts(SOP)andProductofSums
of Products (SOP) and Product of Sums
(POS)arealsostandardforms
AB+CD=(A+C)(B+C)(A+D)(B+D)
(
)(
)(
)(
)
Thesumofminterms isaspecialcaseofthe
,
p
SOPform,whereallproducttermsare
minterms
Theproductofmaxterms
p
isaspecialcaseof
p
thePOSform,whereallsumtermsare
maxterms
SOP d POS C
SOPandPOSConversion
i
SOP POS
F=AB+CD
=(AB+C)(AB+D)
=(A+C)(B+C)(AB+D)
(
)(
)(
)(
)
=(A+C)(B+C)(A+D)(B+D)
Hint1:Useid15:X+YZ=(X+Y)(X+Z)
Hint2:Factor
POS SOP
F=(A+B)(A+C)(C+D)
=(A+BC)(C+D)
(
)(
)
=AC+AD+BCC+BCD
AC+AD+BC+BCD
C+A D+BC+BCD
=A
=AC+AD+BC
Hint 1: Use id15 (X+Y)(X+Z)=X+YZ
Hint1:Useid15(X+Y)(X+Z)
X+YZ
Hint2:Multiply
Thanks
33