Dr.A.Sahu Dept of Comp. Sc. & Engg. DeptofComp.Sc.&Engg. IndianInstituteofTechnologyGuwahati 1 Outline Out e SOP&POSImplementation Boolean function: Representation Booleanfunction:Representation SOM(SumofMinterms),Canonicalform ( ) SOP(SumofProduct) Karnough mapsimplification 2,3,4variablekarnaugh map Dontcarecondition Algorithmforbettergrouping Karnaugh map with >= 5 variable Karnaugh mapwith> 5variable 2 Implementation of SOP ImplementationofSOP A SOP i F(X,Y,Z) = XZ+YZ+XYZ Any SOP expression can be implemented using 2- levelsof gates levels of gates The 1 st level consists of ANDgates, andthe2 nd AND gates, and the 2 level consists of a single OR gate Also called 2-level Circuit Implementation of POS ImplementationofPOS F(X,Y,Z) = (X+Z)(Y+Z)(X+Y+Z) Any POS expression can be implemented using 2- levelsof gates levels of gates The 1 st level consists of OR gates andthe2 nd OR gates, and the 2 level consists of a single AND gate g Also called 2-level Circuit I l t ti f SOP ImplementationofSOP Consider F = AB + C(D+E) This expression is NOT in the sum-of-products form Use the identities/algebraic manipulation to convert to a standardform(sumof products) asinF =AB +CD+CE standard form (sum of products), as in F = AB + CD + CE Logic Diagrams: A F D C B F C B A E C E D 3levelcircuit 2levelcircuit Canonical Forms Canonical Forms It is useful to specify Boolean s use u o spec y oo e functions in a form that: Allows comparison for equality Allows comparison for equality. Has a correspondence to the truth tables Canonical Forms in common usage: Sumof Minterms (SOM) Sum of Minterms (SOM) Product of Maxterms (POM) Simplification: Theorem method Simplification:Theoremmethod E = m(0,1,2,4,5) + + + + = m 0 + m 1 + m 2 + m 4 + m 5 = m 5 + m 1 + m 4 + m 0 + m 2 + m 0 XYZ+XYZ+XYZ+XYZ+XYZ +XZY = XYZ+XYZ+XYZ+XYZ+XYZ +XZY = (XY+XY)(Z+Z) + XYZ+ XZY Y(X+X)(Z+Z) +XZ(Y+Y) = Y(X+X)(Z+Z) + XZ(Y+Y) = Y + XZ BothareinSOP format:2level Simplifiedone:Requireless Gatesandfaster 2 Level 2Level Simplification of Boolean Functions SimplificationofBooleanFunctions An implementation of a Boolean Function AnimplementationofaBooleanFunction requirestheuseoflogicgates. A smaller number of gates with each gate Asmallernumberofgates,witheachgate (otherthenInverter)havinglessnumberof inputs may reduce the cost of the inputs,mayreducethecostofthe implementation. Th 2 h d f i lifi i f Thereare2methodsforsimplificationof Booleanfunctions. 8 SimplificationofBooleanFunctions: h d TwoMethods Algebraic method by using Identities & Algebraicmethod byusingIdentities& Theorem Graphical method by using Karnaugh Map GraphicalmethodbyusingKarnaugh Map method TheKmapmethodiseasyandstraightforward. p y g AKmapforafunctionofnvariablesconsistsof2 n cells,and, ineveryrowandcolumn,twoadjacentcells shoulddifferinthevalueofonlyoneofthelogic variables 9 variables. Karnaugh Map Method Karnaugh MapMethod A graphical method of simplifying logic Agraphicalmethodofsimplifyinglogic equationsortruthtables. Also called a K map AlsocalledaKmap Theoreticallycanbeusedforanynumberof i i bl b i ll li i d 5 6 inputvariables,butpracticallylimitedto5or6 variables. Karnaugh Map Advantages Karnaugh MapAdvantages Minimization can be done more Minimizationcanbedonemore systematically Muchsimplertofindminimumsolutions Easiertoseewhatishappening(graphical) Almostalwaysusedinsteadofboolean minimization. minimization. G C d GrayCodes Graycodeisabinaryvalueencodinginwhich Gray code is a binary value encoding in which adjacent values only differ by one bit 2bitGrayCode 00 01 11 10 10 TruthTableAdjacencies These are adjacent in a gray code sense A B F 0 0 1 - they differ by 1 bit We can apply XY + XY = X AB +AB =A(B+B) =A(1) =A F=A 0 1 1 1 0 0 1 1 0 A B + A B A (B +B) A (1) A 1 1 0 A B F 0 0 0 Sameidea: AB +AB =B 0 0 0 0 1 1 1 0 0 1 1 1 F=B Same idea: A B AB B 1 1 1 Key idea: Problem: Physical adjacency in truth Gray code adjacency allows use of simplification theorems y j y table does not indicate gray code adjacency Karnaugh Map Method Karnaugh MapMethod ThetruthtablevaluesareplacedintheK map map. AdjacentKmapsquaredifferinonlyone variable both horizontally and vertically variablebothhorizontallyandvertically. Thepatternfromtoptobottomandleftto right must be in the form rightmustbeintheform ASOPexpressioncanbeobtainedbyORing all squares that contain a 1 allsquaresthatcontaina1. AB,AB,AB,AB 00 01 11 01 00,01,11,01 Filling of Karnaugh Map FillingofKarnaugh Map Whynot: AB,AB,AB,AB 00, 01, 10, 11 00,01,10,11 Onlytwoadjacentcanbegrouped Group Reduce a variable: AB+AB=A(B+B)=A GroupReduceavariable:AB +AB=A(B +B)=A AB AB AB AB AB,AB,AB,AB 00,01,11,01 All4Adjacentcanbegrouped 2Variable Karnaugh Map 2 VariableKarnaugh Map A B F 0 0 A B 0 1 0 0 0 1 1 0 A=0 B=0 A=1, B=0 0 1 0 1 1 A=0, B=0 A=1, B=1 1 A=0, B=1 Adifferent way to draw a truth table: by folding it A different way to draw a truth table: by folding it Karnaugh Map Karnaugh Map In a Kmap, physical adjacency does imply gray InaK map,physicaladjacencydoes implygray codeadjacency A A A B 0 1 A B 0 1 0 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 F=AB+AB=B F=AB+AB=A 2Variable Karnaugh Map 2 VariableKarnaugh Map A B index F A 0 0 0 1 A B 0 1 0 1 1 1 1 0 2 0 B 0 1 0 1 0 2 0 1 1 3 0 1 1 0 2Variable Karnaugh Map 2 VariableKarnaugh Map AA B 0 1 A B index F 0 0 0 1 B 0 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0 2 0 F = AB + AB = A 1 1 3 0 F = A B + A B = A 2Variable K Map: Grouping 2 VariableKMap:Grouping A B 0 1 A B index F B 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 0 2 0 A = 0 F A 1 0 2 0 1 1 3 0 F=A Another Example A AnotherExample A B index F B 0 1 A B index F 0 0 0 0 0 0 1 0 1 1 1 1 0 2 1 1 1 1 1 0 2 1 1 1 3 1 F = AB + AB + AB (AB + AB) + (AB + AB) = (AB + AB) + (AB + AB) = A + B Another Example AnotherExample AA B 0 1 A B index F B 0 0 1 0 0 0 0 0 1 1 1 1 1 1 A 1 0 1 1 1 1 0 2 1 F = A + B A=1 B=1 0 1 1 3 1 F=A+B Yet Another Example YetAnotherExample A B 0 1 A B index F 0 0 0 1 B 0 1 0 1 1 0 1 1 1 1 1 1 1 0 2 1 1 1 3 1 F = 1 G f th t 1 b bi d Groups of more than two 1s can be combined HALF ADDER: One bit adder HALFADDER:Onebitadder X Y S C 0 0 0 0 x x 0 0 0 0 0 1 1 0 1 0 1 0 Y 0 1 0 0 1 Y 0 1 0 0 0 1 1 0 1 0 1 1 1 0 0 0 1 0 1 X Y S = AB + AB C = AB HalfAdder S = A B + AB = A XOR B 24 S C KMap of three variable K Mapofthreevariable A B C index F 0 0 0 0 1 BC
0 0 0 0 1 0 0 1 1 0 0 1 0 2 1 A BC BC BC BC A 1 0 0 1 0 1 0 2 1 0 1 1 3 0 0 1 3 2 A 1 4 1 5 1 7 1 6 1 0 0 4 1 1 0 1 5 1 4 5 7 6 F= A + BC + BC 1 1 0 6 1 1 1 1 7 1 F= A+B C +BC Groupof4 m(4,5,7,6) Groupof2 m(2,6) Groupof2 m(0,4) F=m(0,2,4,5,6,7) 3VariableKarnaugh MapShowing Minterm Locations A Note the order of theB C variables: A BC 0 1 the B C variables: 0 0 0 1 00 m0 m4 01 m1 m5 0 1 1 1 1 0 ABC=101 01 m1 m5 11 m3 m7 10 m2 m6 ABC=010 Thanks 27
Ten-Decimal Tables of the Logarithms of Complex Numbers and for the Transformation from Cartesian to Polar Coordinates: Volume 33 in Mathematical Tables Series