Implementation of Boolean Functions using Logic Gates

文章推薦指數: 80 %
投票人數:10人

Implementation of Boolean functions using NAND gates Home BooleanAlgebra,ElectronicsTutorials ImplementationofBooleanFunctionsusingLogicGates April20,2021 By RaviTeja Inthistutorial,wewilllearnabouttheImplementationofBooleanFunctionsusingLogicGates.Inourprevioustutorial,welearnedabouttheBooleanAlgebraLawsandassociatedtheorems.WealsolearnedthattheBooleanFunctionscanberepresentedeasilyinSOP(sumofproducts)formandPOS(productofsums)form.Torepresentthesestandardizedequationslogically,weusethelogicgates. AnyBooleanfunctioncanberepresentedbyusinganumberoflogicgatesbyproperlyinterconnectingthem.LogicgatesimplementationorlogicrepresentationofBooleanfunctionsisverysimpleandeasyform. TheimplementationofBooleanfunctionsbyusinglogicgatesinvolvesconnectingoutputofonelogicgatetotheinputofanothergate.CommonlyusedLogicGatesare:AND,OR,NANDandNORgates. Let’shavealookintothelogicgateimplementationofSOPandPOSformsofBooleanfunctions. Outline ABriefIntroductiontoLogicGatesANDGateORGateNOTGateSOPBooleanFunctionImplementationusingLogicGatesImplementationfor2InputVariablesImplementationfor3InputVariablesPOSBooleanFunctionImplementationusingLogicGatesImplementationfor2InputVariablesImplementationfor3InputVariablesImplementationofBooleanfunctionsusingUniversalLogicGatesImplementationofBooleanfunctionsusingNANDgatesImplementationofBooleanfunctionsusingNORgates Conclusion ABriefIntroductiontoLogicGates LogicGatesarethebasicbuildingblocksofdigitalelectroniccircuits.ALogicGateisapieceofelectroniccircuit,thatcanbeusedtoimplementBooleanExpressions. WhileLawsandTheoremsofBooleanLogicareusedtomanipulatetheBooleanExpressions,LogicGatesareusedtoimplementtheseBooleanExpressionsinDigitalElectronics. ANDgate,ORgateandNOTgatearethethreebasiclogicgatesusedindigitalelectronics.Usingthesebasiclogicgates,otherLogicGateslikeNAND,NOR,ExclusiveOR(Ex-OR)andExclusiveNOR(Ex-NOR)arederived. BeforeseeingtheimplementationofBooleanFunctionsusingLogicGates,letusquicklyrecapsomebasicsabouttheimportantlogicgates. ANDGate LogicANDgateisabasiclogicgate,withtwoormoreinputsandoneoutput.TheoutputofanANDgateisHIGHonlyifalltheinputsofthegateareHIGH.TheoutputforalltheothercasesoftheinputsisLOW.ThelogicsymbolandthetruthtableofanANDgateisshownbelow. A B Y=AANDB 0 0 0 0 1 0 1 0 0 1 1 1 If‘A’and‘B’arethetwoinputsofanANDGate,theoutputexpressioniswrittenas:  Y=A.BorY=AB  Itisreadas“YEQUALSAANDB”. ORGate TheORGateisusedtopreformlogical‘OR’operation.ORGatealsocontainstwoormoreinputsandoneoutput.TheoutputofanORgateisHIGHifeitheroftheinputsareHIGH.TheoutputisLOWwhenalltheinputsareLOW.ThelogicsymbolandthetruthtableofanORgateisshownbelow. A B Y=AORB 0 0 0 0 1 1 1 0 1 1 1 1 If‘A’and‘B’arethetwoinputsofanORGate,theoutputexpressioniswrittenas:  Y=A+B  Itisreadas“YEQUALSAORB”. NOTGate LogicNOTgateisanotherbasiclogicgatewithoneinputandoneoutput.TheoutputoftheNOTGateisalwaysthecomplementoftheinput.IftheinputisHIGH,theoutputisLOWandiftheinputisLOW,theoutputisHIGH.ThelogicsymbolandthetruthtableofaNOTgateisshownbelow. X Y=X’ 0 1 1 0 NOTGateisusedtoproducethecomplementofavariableinBooleanAlgebra.So,itisalsocalledasComplementingorInvertingCircuit. SOPBooleanFunctionImplementationusingLogicGates ThesumofproductorSOPformisrepresentedbyusingbasiclogicgates:ANDgateandORgate.TheSOPformimplementationwillhaveANDgatesatitsinputsideandastheoutputofthefunctionisthesumofallproductterms,ithasanORgateatitsoutputside. AnimportanttorememberisthatweuseNOTgatetorepresenttheinverseorcomplementofthevariables. SumofProducts(SOP) Input AND Output OR Implementationfor2InputVariables LetusunderstandhowwecanimplementthefollowingBooleanfunctionusingbasiclogicgates.  F=AB+AB  InthegivenSOPfunction,wehaveonecomplimentterm,B.So,torepresentthecomplimentinput,weareusingtheNOTgatesattheinputside.Andtorepresenttheproductterm,weuseANDgates.SeethebelowgivenlogicdiagramforrepresentationoftheBooleanfunction. Implementationfor3InputVariables LetusnowseehowtoimplementthefollowingBooleanfunctionbyusingbasiclogicgates.Itisa3inputvariablefunction.  F=ABC+ABC+ABC  Inthegivenfunction,wehavetwocomplimentterms,AandC.So,torepresentthecomplimentinput,weareusingtheNOTgatesattheinputside.Andtorepresenttheproductterm,weuseANDgates.SeethebelowgivenlogicdiagramforrepresentationoftheBooleanfunction. POSBooleanFunctionImplementationusingLogicGates TheproductofsumsorPOSformcanberepresentedbyusingbasiclogicgateslikeANDgateandORgates.ThePOSformimplementationwillhavetheORgateatitsinputsideandastheoutputofthefunctionisproductofallsumterms,ithasANDgateatitsoutputside.InPOSformimplementation,weuseNOTgatetorepresenttheinverseorcomplementofthevariables. ProductofSums(POS) Input OR Output AND Implementationfor2InputVariables LetusnowseehowtoimplementthefollowingBooleanfunctionbyusingbasiclogicgates.  F=(A+B).(A+B)  Inthegivenfunction,wehaveacomplementterm,B.So,torepresentthecomplimentinput,weareusingtheNOTgatesattheinputside.Andtorepresentthesumterm,weuseORgates.SeethebelowlogicdiagramforrepresentationoftheBooleanfunction. Implementationfor3InputVariables ImplementtheBooleanfunctionbyusingbasiclogicgates.  F=(A+B+C).(A+B+C).(A+B+C)  InthegivenBooleanFunction,wehavetwocomplimentterms,AandB.So,torepresentthecomplimentinput,weareusingtheNOTgatesattheinputside.Andtorepresentthesumterm,weuseORgates.SeethebelowgivenlogicdiagramforrepresentationoftheBooleanfunction. ImplementationofBooleanfunctionsusingUniversalLogicGates NANDgateandNORgateareconsideredtobe‘UniversalLogicGates’.Thereasonbehindthisis,NANDgateandNORgatecanperform(orcanfunctionlike)allthe3basicgates,suchasANDgate,ORgateandNOTgate.WecandesignanybasiclogicgatebyusingNANDgateorNORgate.Thisiswhytheyarecalledas“UniversalGates”. LetusseetheimplementationoftheBooleanfunctionsusinguniversallogicgates. ImplementationofBooleanfunctionsusingNANDgates NANDgateisalogicalcombinationofANDgateandNOTgateandthiscanfunctionlikeANDgate,ORgateandNOTgate.So,weuseNANDgatestoimplementtheBooleanfunction. TheimportantthingtorememberaboutNANDgateisthisistheinverseofbasicANDgate.ThismeanstheoutputoftheNANDgateisequaltothecomplementoftheoutputoftheANDgate. Let’sseeanexampletounderstandtheimplementation. ImplementtheBooleanfunctionbyusingaNANDlogicgate.  F(A,B,C,D,E)=A+(B+C)(D+BE)  InNANDgateimplementation,weuseNANDgatesatbothinputandoutputside.Observethedesignedlogicdiagrambelow.ThestepbystepproceduretoimplementthegivenBooleanfunctionusingNANDgatesisshownbelow. First,thegivenBooleanfunctionorequationshouldberepresentedusingAND-ORgates.TheAND-ORimplementationisshownbelow. InordertoconverttheANDgatesintoNANDgates,abubble(complement)isintroducedattheoutputoftheANDgate.Tocompensatethebubble,theinputofthenextgateisalsointroducedwithabubble.Theimplementationisshownbelow. Toimposeuniformityattheinput,ifagatehasoneinputwithabubble,theotherinputisalsointroducedwithabubble.Again,inordertocompensatethebubble,theoutputoftheprecedinggateisintroducedwithbubbleorcomplementtheliteral.Thesameisshowninthefollowingfigure. IfanORgateisnothavinganybubbleateitheroftheinputs,bubblesareintroducedandareappropriatelycompensatedasshowninthefigurebelow. AnORgatewithtwocomplementedinputsisequivalenttoaNANDgate(accordingtoDeMorgan’sLawA’+B’=(AB)’).Hence,replacingtheORgate,whichishavingtwocomplementedinputs,withNANDgate,wegetthefinalstructureoftheimplementationoftheBooleanfunctionusingNANDgates.Thefinalimplementationisshownbelow. ImplementationofBooleanfunctionsusingNORgates NORgateisthecombinationofORgateandNOTgateandthiscanfunctionlikeANDgate,ORgateandNOTgate.So,weuseNORgatetoimplementtheBooleanfunctions.TheimportantthingtorememberaboutNORgateisitistheinverseofbasicORgate.ThismeanstheoutputoftheNORgateisequaltothecomplementoftheoutputoftheORgate. Let’sseeanexampletounderstandtheimplementation. ImplementtheBooleanfunctionbyusingNORlogicgate.  g(A,B,C,D,E,F)=(AE)+(BDE)+(BCEF)  Wecanrewritethegivenequationas:  g(A,B,C,D,E,F)=AE+BDE+BCEF   =(A+BD+BCF)E   =(A+B(D+CF))E  InNORgateimplementation,weuseNORgatesatbothinputandoutputside.Observethedesignedlogicdiagrambelow. Conclusion Acompletebeginner’stutorialonImplementingBooleanFunctionsusingLogicGates.Youlearnedsomebasicsoflogicgates(AND,OR,NOT),SumofProducts(SOP)andProductofSums(POS)representationofequationsandtheirimplementationusinglogicgatesandalsoimplementationofBooleanexpressionsusingUniversalGates(NANDandNOR). RelatedPosts:LogicSymbolsforBasicLogicGates(OR,AND,NOT,NAND,…HalfAdderandFullAdderCircuitsExclusiveORGate(XORGate)ParityGeneratorandParityCheckWhatisaDemultiplexer(Demux)?Multiplexer(MUX)andMultiplexing 7Responses Veryuseful Reply CanyousolvethisusingnorgateONLY- B'(CD)’+A’C’D Reply s.o.pexpressionisbestsuitedwithnandgateonly. Reply IwanttoenquirehowtoimplementtheA/Businglogicgates Reply Canusolvethisbooleanexpressionusingnandgatef=A(B+CD)+BC’ Reply thisisgreat Reply PlscanyousolvethisusingnandgateF=X’Y’Z+X’YZ+XY’ Andalsoplsgivetherequiredtruthtablexxxx Reply LeaveaReplyCancelreplyYouremailaddresswillnotbepublished.Requiredfieldsaremarked*Comment*Name* Email* Website Δ Menu Learn Tutorials DIY ProductReviews Guides&Howto About



請為這篇文章評分?