Implementing Logic Functions Using Only NAND or NOR Gates

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

Implementing and Converting Logic Circuits Using Only NAND or NOR Gates · Exchange all of the AND operators for OR operators, and vice versa. Continuetosite Advertisement DigitalDesign ImplementingandConvertingLogicCircuitsUsingOnlyNANDorNORGates By MaxMaxfield | Thursday,May17,2018 shares Thisisgoingtobeacolumnthat’sdividedintothreesections.It’sbasedonaquestionthatastudentposedintheEEWebforums,andhealsosentitdirectlytoyourstruly.Thecoreofthisconundrumisasfollows: ThestudenthasbeenpresentedwithaBooleanEquation. He’sbeeninstructedtocreateacorrespondingtruthtable. He’sbeentoldtoperformKarnaughmapminimization. Finally,hemustcreateanimplementationusingonlyNANDgatesoronlyNORgates. So,whatwe’regoingtodoisstartbyponderingwhythisclassofproblemshouldbeposedinthefirstplace.Next,we’regoingtolookatthisstudent’sparticularposerinmoredetail,takingittoaninitialAND-ORsolution.ThenwearegoingtoconsiderthegeneralconceptsoftranslatingAND-OR-basedcircuitsintotheirNAND-NORcounterparts.Finally,wewillusewhatwe’velearnedtoaddressthestudent’sinitialquestion.Phew!WhyuseonlyNANDgatesoronlyNORgates?So,whywouldalecturerrequestthathisstudentsimplementalogicfunctionusingonlyNANDgatesoronlyNORgates(notethatIspecificallydidn’tsay“onlyNANDorNORgates,”becausethiscouldbeconstruedtomeanthatyoucanusebothNANDsandNORs,butnotANDsandORsetc.)Althoughstudentsmaybesurprisedtohearthis,it’snotnecessarilythecasethatthelecturerisabitter,frustratedpersonwhoseonlypleasureinlifeistomakehisorherpupils’livesmoredifficult.Havingsaidthis,thinkingbacktomyowndaysasastudent,itmaybebestthatwedon’tactuallyrulethisoutasapossiblemotivation.Offthetopofmyhead,Icanthinkofthefollowingreasonsforlecturersinstructingtheirstudentstoperformthistask: TakingacircuitdescribedusingANDandORgatesineitherasum-of-productsoraproduct-of-sumsformatandconvertingitintoanalternativerepresentationusingonlyNANDgates,onlyNORgates,oramixtureofNANDandNORgatesisagreatwaytomakesureyouunderstandhowthevariousgateswork.ItalsohelpsensurethatyouunderstandthingslikeDeMorgantransformations. Ifyouaredesigningaprintedcircuitboard(PCB)usingsimplelogicdevices,likedual-in-line(DIL)packagedintegratedcircuits(ICs)containingsixNOTgatesorfour2-inputAND,OR,NAND,orNORgates,itmaybethatyouendupshortofsomethinglikeanANDgate,butyouhappentohaveaNANDandaNOTgategoingspare(orperhapsanORandthreeNOTs),inwhichcaseyourunderstandingoflogicgatescansavetheday. ThesimplestlogicgateisaNOT.AssumingwearetalkingaboutCMOS,thenaNOTwillrequiretwotransistors.NextupthecomplexityladderareNANDandNORgates,eachofwhichcontainfourtransistors.AndthenwehaveANDandORgates,eachofwhichcontainsixtransistors.AllofthismeansthatifwecanuseaNANDoraNORinsteadofanANDoranOR,thenwecanreduceourtransistorcountbyathird. Withregardtothepreviouspoint,anANDgateisreallyformedfromaNANDgatefollowedbyaNOTgate(similarly,anORgateconsistsofaNORgatefollowedbyaNOTgate).Inadditiontousing4+2=6transistors,thismeanstheANDgate(andanORgate)consistsoftwostagesofdelay.Thus,ifwecanreplaceourANDswithNANDs(andourORswithNORs),ourcircuitwillfunctionfaster. Asaslightaside,everythingdiscussedinthiscolumnisdescribedinexcruciatingdetailinmybook,BeboptotheBooleanBoogie. Inreality,veryfewpeopledesignatthegate-levelthesedays.Instead,wecaptureourdesignsatahigh-levelofabstractionandthenusealogicsynthesisenginetogeneratethecorrespondinggate-levelequivalent.Thismeansthatpoints2through4arenotasimportantastheyusedtobe.Itcouldbearguedthatthesamethingapplieswithregardtopoint1,butIwoulddisagree.ThewayIthinkofthisisthatit’ssimilartotheconceptofusingacalculatortoperformyourcomputations.Ifyouhaveacalculatortohand,youdon’tactuallyneedtoknowhowtoperformaddition,subtraction,multiplication,anddivisiononinteger,real,andfloating-pointnumbers,buthavingsuchknowledgecertainlycomesinhandywhenyourcalculator’sbatterydies.Similarly,althoughyoumightnotneedtomanipulateBooleanconstructionsonadailybasis,it’sjollyhandytoknowhowtodothisstuffwhentheneedarises.PonderingtheproblemSo,here’swhatthestudentgaveme.Hestartedbysayingthatthelecturerhadpresentedtheclasswiththefollowingequation:Thestudentalsotoldmethathehadusedthisequationtogeneratethefollowingtruthtable,butthathewashavingproblemsmovingforwardfromthispoint.Well,IhadtotellhimthatIwasn’tsurprisedhewashavingproblems,becausetherearesixproducttermsinhisequation,eachofwhichshouldhaveacorresponding1intheoutputcolumnofhistruthtable,but—infact—thereareonlyfive1sassociatedwiththeoutputinhistruthtable.I’vebeenruminatingaboutthisquitealot,andIthinktheunderlyingproblemisthatthere’salackofunderstandingoffirstprinciples.There’salsothepointthatifonestudentisconfused,thenhe’sprobablynotalone.Last,butnotleast,Irememberfeeling“baffledandbewildered”whenIstartedout,soI’mgoingtotakethetimetoworkthisthroughstep-by-step(feelfreetoskipaheadifyougetbored;alternatively,youcanalsofeelfreetotrytospotanydeliberateerrorsImayhaveintroducedtoseeifyou’repayingattention).ThefirstthingI’mgoingtodoistonumbertheproducttermsintheequationsothatwecankeeptrackofwherewe’reatandwhatwe’redoing(ifweweredoingthisforreal,wewouldn’tbothertonumbertheproductterms):Thenextstepistocreatethetruthtable.Westartwithalloftheinputcombinationspresentedasastandardbinarycountasillustratedin(a)below,thenweaddthesix1scorrespondingtothesixproducttermsasillustratedin(b)through(g),andfinallywefillinanyremainingoutput“slots”with0sasillustratedin(h)below.Themainpointtonotehereisthattranslatingtheequationintothetruthtablereallyisn’tdifficultatall.Havingsaidthis,it’scrucialthatwhoeverisdoingthisappreciatestheunderlyinglogicbehindtheprocess.Lookattheequationagain—whatthisessentiallysaysisthat:“Theoutputistrue(logic1)ifthefirstproductterm(thefirstANDfunction)istrue,ORifthesecondproducttermistrue,ORifthethirdproducttermistrue,etc.).Thisiswhywecansimplyadd1stotheoutputcolumncorrespondingtoeachofourproductterms—theoutputwillbetrue(1)ifanyoftheseproducttermsaretrue,otherwisetheoutputwillbefalse(0).ThenextstepistocreatetheKarnaughmap.Westartbycreatingthegriditself.Sincewehavethreeinputs,therearetwoways(options)wecoulddothisasillustratedbelow:Itdoesn’tmatterwhichoftheseoptionswechoosetouse.Theanswerwillbethesameinbothcases(ifnot,wereallyhaveproblems).I’mgoingtouseOption#1becausethat’sthewayIlikeit.Ifanystudentsarereadingthis,Isuggestthat—afterwe’vefinished—youredoeverythingfromthispointonusingtheOption#2Karnaughmaptoensureyoureallyunderstandtheprocess.LookingattheOption#1map,observewhereweshow“AB”.Totherightarethefourcombinationsof0sand1sthatwecanhaveassociatedwiththeABinputs:“00”,“01”,“11”,and“10”.It’sveryimportanttoobservethatthesecombinationsarepresentedinsuchawaythattheyformaGraycode,whichmeansonlyasinglebitchangesaswemovefromonevaluetoanadjacentvalue.ThisiskeytothewayinwhichtheKarnaughMapworks.Inthebinarycode,whenwetransitionfrom01to10,twobitschange.Bycomparison,ifwelookatthecorrespondingtransitionintheGraycode(01to11),onlyasinglebitchanges.Furthermore,considertheverylastlineofthebinarycode.Ifwewereto“wraparound”andtransitionfromthislinetothefirstline(11to00),then—onceagain—twobitschange.However,ifwelookatthecorrespondinglinesintheGraycode(10to00),weseethat—onceagain—onlyoneofthebitschanges.OK,sonowlet’spopulateourKarnaughMap.Wedothisbyadding1sintoeachoftheboxescorrespondingtotheproducttermsinourequation.Onceagain,wewilldothisstep-by-stepasillustratedbelow(thesmallnumbers1through6inthecirclescorrespondtotheproducttermsinouroriginalequation):Anotherpointtonotehereisthatwedon’tneedthetruthtableinordertopopulatetheKarnaughmap.Allwehavetodoisstrollalongourequationand,foreachproductterm,weadda1intothecorrespondingKarnaughmap“box.”ThenextstageistouseourKarnaughmaptominimizethelogic.LookingatthefinalKarnaughmap(f)above,weimmediatelyseethatwecanreducethistoonlythreeterms.Asusual,let’sdothisonestepatatime.Observethetwo1shighlightedintheimagebelow.Weknowthatthismeanstheoutputis1inboththesecases.Foreachoftheseboxes,A=0andC=1,sothesevaluesareimportant.However,B=0foroneoftheseboxesand1fortheotherbox.WhatthissaysisthatsolongasA=0andC=1,wedon’tcarewhetherBis0or1.Next,let’slookatthesecondgroupoftwo1shighlightedintheimagebelow.Foreachoftheseboxes,A=1andC=0,sothesevaluesareimportant.Onceagain,however,B=0foroneoftheseboxesand1fortheotherbox.WhatthissaysisthatsolongasA=1andC=0,wedon’tcarewhetherBis0or1.Last,butnotleast,let’slookatthegroupoffour1shighlightedintheimagebelow(oneofthetricksaboutKarnaughmapsisthatwecanusethesame1saspartofmultiplegroups).Inthiscase,forsomeoftheseboxesA=0,forothersA=1,whichmeanswedon’tcarewhetherAis0or1.Similarly,forsomeoftheseboxesC=0,forothersC=1,whichmeanswedon’tcarewhetherCis0or1.Infact,theonlyinputthatisconstantacrossallforboxesisB,whichisalways1.WhatallofthismeansisthatwecanusetheresultsfromourKarnaughmapminimizationtowriteanoptimizedsum-of-productsequationasfollows:Fromthis,wecaneasilydrawacorrespondinggate-levelschematicusingNOT,AND,andORgatesasillustratedbelow:Beforeyouemailme,Iknowthatwe’renotusingthe!Bsignal(I’musingthe‘!’characterheretoindicateNOT(B)becauseIcan’tdrawahorizontallineovertheletterinthistext),butwewillbeusingitinthenot-so-distantfuture.Speakingofwhich,thefutureiscloserthanyoumightthink.Thisisthepointwherewehavetoputourthinkingcapson,becausethetaskposedbytheloathsomelecturerwastopresentthefinalcircuitusingonlyNANDgatesoronlyNORgates.ImplementingNOTgatesusingNANDsorNORsLet’sstartwiththelow-hangingfruit,whichwouldbethethreeNOTgatesinthisexample.First,let’sremindourselvesthatthetruthtablesforthefivecommonprimitivegatesareasillustratedbelow:Whatthismeansisthat,ifwestrap(connect)theinputstoaNANDgatetogether,theresultingfunctionalityisthatofaNOTgate.ThesamethingappliesifwestraptheinputstoaNORgatetogether.Thismeansthatthefollowingarefunctionallyidentical:DeMorgantransformationsonAND,OR,NAND,andNORgatesAugustusDeMorgan(1806-1871)wasacontemporaryofGeorgeBoole.DeMorganmadesignificantcontributionstothefieldofsymboliclogic;mostnotably,asetofruleswenowcallDeMorgantransformations.InordertoperformaDeMorgantransformationonaBooleanequation,weperformthefollowingsteps: ExchangealloftheANDoperatorsforORoperators,andviceversa. Invertalloftheinputvariables;alsoexchangeany0sfor1s,andviceversa. Inverttheentirefunction. Reduceanymultipleinversions. Generallyspeaking,wetendtoperformDeMorgantransformationsonmulti-termequations,butwecanalsoperformthemonindividualgates,whichleadsustothefollowing:Idon’tknowaboutyou,andIcan’texplainwhythisshouldbe,butIgetacertainsatisfactionandafeelingthatallisrightinthe(logical)worldfromlookingattheDeMorganequivalentsabove.RepresentingourcircuitusingonlyNANDgatesTobehonest,nowwe’velaidthegroundwork,thisistheeasypart.Let’sremindourselveswhatthecircuitweareplayingwithlookslikewhenimplementedusingNOT,AND,andORgates:I’vecolor-codedthesetomakeitclearwhatwe’redoing.Let’smakethedecisionthatweonlywishtoemployNANDgates.So,usingeverythingthatwe’vediscussedearlier,let’sswapoutourNOT,OR,andANDgatesforNANDgates.Asusual,let’stakethisstep-by-step.Let’sstartwiththethreeNOTgatesshowninpinkontheleft.Weknowthatwecanexchangeeachofthesegatesfora2-inputNANDgatewithitsinputsstrapped(tied)together,sonoproblemsthere.Next,let’sconsiderthe3-inputORgateshowningreenontherightofourcircuit.FromourDeMorgantransformations,weknowwecanreplacethiswitha3-inputNANDgatewithNOTgatesonitsinputsasillustratedbelow.And,onceagain,ofcourse,wecanreplaceeachofthethreeNOTgateswitha2-inputNANDgateasillustratedbelow:So,allwehavetoworryaboutnowisthetwoANDgatesshowninblueinthemiddleofourcircuit.Ofcourse,ourDeMorgantransformationsareofnohelphere,becausetheequivalentofanANDgateisaNORgatewithNOTgatesonitsinputs,andwearen’tallowedtouseNORgatesinthisexercise.Sometimeswehaveatendencytomakethingsmorecomplicatedthantheyneedtobe.AllwehavetodointhiscaseisrememberthatanANDgateisreallyformedfromaNANDgatefollowedbyaNOTgate(similarly,anORgateconsistsofaNORgatefollowedbyaNOTgate).ThismeansthatwecanreplaceourANDgatesasillustratedbelow:And,ofcourse,sincewearetaskedwithusingonlyNANDgates,wewouldhavetoreplacetheNOTgatewithits2-inputNANDequivalentasillustratedbelow: Nowwe’rereallycookingonahotstove,astheysay.So,ifwepullallofthistogether,ourNAND-onlyimplementationwilllooklikethefollowing:Thecircuitabovewouldperformthedesiredfunction,butwearewastinggates,becausewehavetwocasesofaNOTgatefollowedbyaNOTgate(bothimplementedasNANDgates,ofcourse)asindicatedbytheredboundaryboxesbelow:AnytimewehaveanevennumberofinversionsintheformofNOTfunctions,wecanreplacethemwithasimplepieceofwire.Thus,withalittlefinagling,ourfinalcircuitwilllooklikethefollowing:IfweweretosaythatNOT,NAND,andNORgateseachequatetoonelevelofdelay,whileANDandORgatesequatetotwolevelsofdelay,thentheworse-caseinput-to-outputpathsinouroriginalNOT,AND,andORimplementationwouldequateto1+2+2=5delays.BycomparisonourspiffyNAND-onlyimplementationequatesto1+1+1=3delays.Onceagain,ifanystudentsarereadingthis,justtomakesureyouare100%ontopofthings,IsuggestthatyouusetheabovediscussionsasthebasisforcreatingaNOR-onlyimplementation.Inthemeantime,Iwelcomeanycommentsandquestions,andI’dalsoappreciateseeinganyrelatedtipsandtricksanymoreexperiencedreadersmightcaretoshare.AdditionalReading KarnaughMaps CalculatorsandTools GrayCodes,Part1 GrayCodes,Part2 GrayCodes,Part3 GrayCodes,Part4 GrayCodes,Part5 Advertisement OtherRelatedTopics SimpleandPerformantThermalManagementSolutionforCSPGaNFETs  Multi-PartyComputation:ACryptographicMarvelinSearchofItsCommercialSweetSpot ElectronicsforKids:Part5—ProducingCleanEnergy HowtheEnergySectorWillBeAffectedbyWireandCableAssemblyPrices JointheConversation! 24Repliesto“ImplementingandConvertingLogicCircuitsUsingOnlyNANDorNORGates” PeterTraneusAndersonsays: August26,2020at7:07pm Excellentdiscussion!IfinallyunderstandKarnaughmaps.I’vebeendoinglogicdesignsince1973.TheWikipediapageonKarnaughmapsstatesthattheywereinventedbyAllanMarquandin1881,foramechanicallogicmachine. Ifyouhaveanexclusive-orgate,thefunctioncanbeimplementedas: D=(.not.B).nand.(A.xor.C) LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @TraneusRex:“…Excellentdiscussion!IfinallyunderstandKarnaughmaps…” ThankssomuchPeter—regardingXORgates,youcanuseafunction’sKarnaughmaptosee(ataglance)ifthatfunctioncanbeimplementedusingonlyXORorXNORgates(seemycolumn onReed-MullerLogic) LogintoReply JohnBeetemsays: August26,2020at7:07pm There’saveryneattrickfordoingNAND-andNOR-baseddesignthatseemstobelostexceptinthefailingmemoriesofsexagenariansandolder. InthelastfigureinMax’sarticle,eachNANDgateisdrawnasanANDwithinvertedoutput. That’sfinefortheNANDsthatyou’reusingtoperformANDfunctions,buttherightmostNANDinthatdiagramisactuallybeingusedtoperformanORfunction. DrawingitasanANDwithinvertedoutputobscuresthis. UsingDeMorgan’slaw,youcandrawaNANDasanORgatewithinvertedinputs. Similarly,youcandrawaNORgateasanANDgatewithinvertedinputs. Here’sthatlastfigurewiththeoutputNANDdrawninDeMorgan’sform: TheinputinvertersontheoutputNANDcanceltheoutputinvertersofthe2-inputNANDsandthediagramisessentiallythesameasifdrawnwithANDsandORs. Thistrickis(was?)sometimescalledFunctionalLogicDiagramssincetheintendedAND/ORfunctionofagateisshownbyitsshape. TherearealsoDeMorgan’sformsofAND,OR,andNOR,shownhere. LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @John:“…That’sfinefortheNANDsthatyou’reusingtoperformANDfunctions, buttherightmostNANDinthatdiagramisactuallybeingusedtoperform anORfunction. DrawingitasanANDwithinvertedoutputobscures this…” Oooh—youarecorrect—I’dforgottenallaboutthis—Icallit“assertion-levellogic”—Iwillcoverthisinmoredetailinafollow-upcolumn. LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @John:“…Here’sthatlastfigurewiththeoutputNANDdrawninDeMorgan’sform…” The onlyproblemhereisthatthenefariouslecturerrequestedthatthe circuitbeimplementedusingonlyNANDgates(oronlyNORgates,but let’snotworryaboutthathere),soeventhoughyourfinalgatesymbol inDeMorganform(asanORwithinvertedinputs)isthesame functionallyasaNAND,I’mnotsurethatthiswouldflywiththe teacher. LogintoReply JohnBeetemsays: August26,2020at7:07pm Asfarasgradesareconcerned,yes,thelecturerisalwaysright. However,asfarasI’mconcernedtherearemultiplesymbolsforaNANDgate:anANDgatewithoutputbubble,anORgatewithinputbubbles,andaninverter(i.e.,single-inputNANDgate)witheitheraninputbubbleoranoutputbubble. Theyallbehavethesameway. They’reNANDgates. EvenifoneusesthoseawfulIEEEsymbols. Oryou’reoldenoughtorememberORgatesthatlookedlikeANDgatesbuttheinputlineswentallthewaythroughthesymbol. Thejobofatechteacheristoclarifycomplexthings,notmakethemharder. It’sthejobofalogicteachertoshowthefundamentaldualityofANDandOR. It’sthejobofanEnglishteachertointroduceyoungmindstogreatlineslike:“Howabsolutetheknaveis;wemustspeakbythecardorequivocationwithundous.” LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @John:“It’sthejobofanEnglishteachertointroduceyoungmindstogreat lineslike:‘Howabsolutetheknaveis;wemustspeakbythecardor equivocationwithundous’…” AreallygoodEnglishteacherwilltellthemtosay“…willundous…”insteadof“…withundous…” Sorry—Icouldn’thelpmyself—AubreyKagandelightsinspottingmymanyslip-upsLOL LogintoReply JohnBeetemsays: August26,2020at7:07pm ‘Zounds! Youwouldhavethoughtthattheeewebtexteditorwouldhavecaughtthat. Ididreviewitseveraltimesbeforeposting. Eachtimeitlookedright! Letmeseeifthere’syetsomeliquorleft. MaxMaxfieldsays: August26,2020at7:07pm @John:“…Letmeseeifthere’syetsomeliquorleft…” Zoundsindeed—it’sbeenalongday—savesomeforme!!! PeterTraneusAndersonsays: August26,2020at7:07pm Goingbackto1973-eraTTLlogic,anyfunctionofthreeinputscanbeimplementedusingone74151one-of-eightmultiplexer:WiretheABCinputsofthefunctiontotheABCdata-selectinputsofthe74151,andwiretheeightdatainputsofthe74151tohighorlowasinthetruthtable.The74151outputthengivesyoutheDoutput. Ifyouhaveafunctionoffourinputs,addaninvertertogettheinverseofthefourthinput,andwiretheeightdatainputstohighorloworfourth-inputor.not.fourth-input. Ifyouhaveafunctionoffiveinputs,replacethe74151witha74150one-of-sixteenmultiplexertogainafourthselectinput. Ifyouhaveafunctionof25inputs,usea4Mx8flashPROMdrivingthedatainputsofa74151.22PROMaddressbitsplus3selectbitsofthe74151gives25inputs. Withallofthesemethods,bewareofraceconditions:Considertwostatesthatdifferbyonlyoneinputbit,andgivethesameoutputlevel.Startinonestate,andchangetheinputbittogototheotherstate.Theoutputmaytransientlyswitchandswitchbackwhilethechangespropagatethroughthelogic. OncewehadPROMsandEPROMstostoremicroprocessorcode,wecouldusethemtodotable-lookuplogicfunctions. LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @TraneusRex:“…Goingbackto1973-eraTTLlogic,anyfunctionofthreeinputscanbeimplementedusingone74151one-of-eightmultiplexer…” DidyouseethetwocolumnsIpostedawhileback? Using8:1MultiplexerstoImplementLogicalFunctions Usingan8:1MultiplexertoImplementa4-inputLogicalFunction LogintoReply ElizabethSimonsays: August26,2020at7:07pm ThestandarddesignflowfromKarnaughmaptoAND-ORlogictoNANDlogicthatyouusedhereworkswell(andisrelativelyeasyifyouknowthetrickbutdoesnotworkwellforconvertingtoNORlogic. There’sawaytogetOR-ANDlogicoutofaKarnaughmapthatworksbetterforconvertingtoNORlogic.Conceptually,youlookatthezerosinsteadoftheones,invertthepolarityofthetermsandswaptheuseofANDandOR. Thiswillbeleftasanexercisefortheadvancedstudent.LOL LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @Elizabeth:“…Conceptually,youlookatthezerosinsteadoftheones,invertthepolarityofthetermsandswaptheuseofANDandOR…” ItallsoundssoeasyifyousayitquicklyLOL LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @Elizabeth:“…ThestandarddesignflowfromKarnaughmaptoAND-ORlogictoNANDlogic thatyouusedhereworkswell(andisrelativelyeasyifyouknowthe trick)butdoesnotworkwellforconvertingtoNORlogic…” Ibegtodisagree—IthinkitworksequallywellforNORlogic—inthiscaseyoujustdothefollowing—fromlefttoright: #1SwapoutthethreeNOTgateswiththreeNORs(withinputsstrappedtogether) #2SwapeachANDforaNORwithitsinputsinvertedwithadditionalNORs #3SwaptheORforaNORwithaninvertedoutput. #4Removeanymultipleinversions(notshownintheimagebelow) LogintoReply ElizabethSimonsays: August26,2020at7:07pm Whichgetsyouto6gatesinfourlevels… Mymethodgivesme5gatesinthreelevels(samecomplexityastheNANDsolution) Ofcourseyoudohavetothinkupside-downandbackwardstodoitLOL LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @Elizabeth:“…Ofcourseyoudohavetothinkupside-downandbackwardstodoit…” That’swhytheycallusengineers! LogintoReply PeterTraneusAndersonsays: September9,2020at2:15pm ToimplementElizabethSimon’sNOR-logicmethod,rewritetheequationasfollows(using!torepresentinversion): D=!((!A!B!C)+(A!BC)) ThiscanbeimplementedusingfiveNORgates: FirstNORgategivesthefirstterm:F=!A!B!C=!(A+B+C). SecondNORgateinvertsBto!B. ThirdNORgateinvertsCto!C. FourthNORgategivesthesecondterm:S=!ABC=!(A+!B+!C). FifthNORgatecombinesthetwoproductterms:D=!(F+S). LogintoReply JohnBeetemsays: August26,2020at7:07pm ThetrickofextractingzerosinsteadofonesfromaK-mapisalsohowtodesignwithAND-OR-INVERT(AOI)gates. Formanylogicfamilies,anAOIgategivesyoutwolevelsoflogicwiththedelayofasinglegate. ThatletsyoudoMax’slastexamplewithasingleleveloflogic,plusinverters. Ifyourlogicfamilygivesyouinvertersforfree(likeECLorCML)you’regolden. Orburnedredifyousitontheheatsinks. LogintoReply PeterTraneusAndersonsays: August26,2020at7:07pm Max,thanksforthelinkstoyourarticles.Ihadn’tseenthembefore. John,IlovedAND-OR-INVERTgates. Elizabeth,whenthinkingupside-downandbackwards(particularlyaboutanalogcircuits),rememberthatj=sqrt(-1)isa90-degreerotation. Writingaboutbackwards,Ilearnedtoanalyzeanalogcircuitsstartingattheoutputandworkingtowardstheinput.Doesanyoneelsedoitthatway? LogintoReply MaxMaxfieldsays: August26,2020at7:07pm @TraneusRex:“…Ilearnedtoanalyzeanalogcircuitsstartingattheoutputandworkingtowardstheinput.Doesanyoneelsedoitthatway?…” WhenIfirstreadthismyeyessay“analyze”butmymindsaid“debug”—Ican’ttalkaboutanalogbecausethosewibblywobblysignalsmakemybrainache.Inthecaseofdigital(thewayelectronicswasmeanttobe)—especiallyinthecaseofdebugginganincorrectlyoperatingdigitalcircuit—Itendtostartbylookingatwhat’scomingoutandthentakeaWAG(aild-assguess)basedonmyexperience—ifthatdoesn’rleadtotheproblem,thenIstartattheoutputsandworkmywaybacktotheinputsuntilIgettothepointwhereIseewhatIexpectgoingintosomething(acomponentorfunctionalblock)butIdon;tseewhatIexpectcomingout.Ofcourse,I’mthinkingoftraditionallogic-basedcircuitshere—whenwecometohonkingbigboardswithmultipleprocessorsrunningatGHzspeedswithcomplexprotocols,thewayIdebugtheseistogiveittosomeonewhohasaclueandsay“Canyoufixthis?”LOL LogintoReply ElizabethSimonsays: August26,2020at7:07pm MostofthecircuitsIdealwithareanalogcircuitsthatarepretendingtobedigitaltolullmeintothinkingIunderstandthem. Mydebuggingtechniquestartswith“Isitpluggedinandturnedon?”Ifnecessary,wethenmovetomoreadvancedquestionsaboutpowersupplyvoltagesandsignallevels.MostofthetimetheproblembecomesapparentbeforewegettotheGHzspeedsandcomplexprotocols. LogintoReply JohnBeetemsays: August26,2020at7:07pm Peterwrote:Ilearnedtoanalyzeanalogcircuitsstartingattheoutputandworkingtowardstheinput.Doesanyoneelsedoitthatway? ToborrowfromZippythePinhead:“Oh,Irunscreamingfromanythingthat’sAnalog. Analogisn’tanyfun. AnaloggivesmeaBigMigraine.” Myotherfavoriteanalogquote:“Anoscillatorwon’t. Anamplifierwill.” Igenerallyavoidanalog,sinceIhaveenoughtodobetweendigitalhardware,software,andFPGAs(whichcombinethefirsttwoinfascinatingways). Thelatterare“exactsciences”likemathematics. Analogisan“inexactscience”likephysicsandchemistry. Someanalogcircuitsyoucanreadfrominputstooutputs,orasPetersays,fromoutputstoinputs. Inothersyouhavetolocatekeyfeatures—likethecurrentsourceinECL/CMLoroneormorefeedbackloops—andworkyourwayoutfromthere. Someanalogcircuitsuseunusualsecondarypropertiesofcomponents,whichlotsoffun. Agreatexampleisthemultiple-emittertransistorusedinTTLNANDgates,wherethetransistorisusedbackwardsinanon-amplifyingmode. Anothergreatexampleisusingalightbulbasaheat-sensitivevariableresistorasinHP’s200AaudiooscillatorbasedonBillHewlett’smaster’sthesis. AnalogremindsmeofRobertBloch’sgreatlinefrom“TheSkulloftheMarquisdeSade”: “Witchcraft? Notinthisdayandage.” LogintoReply Yossirisays: September5,2020at11:35pm HiMax, WhatsoftwaredidyouusetodrawtheKarnaughmapsandlogiccircuitsabove? LogintoReply MaxMaxfieldsays: September8,2020at11:27am HiYossiri—IuseMicrosoftVisio—I’vebeenusingitforsolongnowthatIcan;teventhinkaboutusingsomethingelse,butthereareavarietyofdifferentpackagesoutthere—Max LogintoReply AddCommentCancelreplyYoumustbeloggedintopostacomment. ThissiteusesAkismettoreducespam.Learnhowyourcommentdataisprocessed. MostRecentComments v.verbitsk 2022-07-0610:17:44 Thanksfortherecommendations,I'llkeepaneyeonthethread... calimero22 2022-07-0514:12:13 Hi trytoreadthis... https://www.eeweb.com/oxygen-reduction-in-graphene/ Cheers G ... calimero22 2022-07-0514:12:12 Hi OnInternetyoucanfindanycourseaboutArduino,butthebestapproachistofollowthecoursesdirectlywithagoodteacher,alsoonline. Giovanni ... calimero22 2022-07-0514:12:11 Hi. YoucanreceivearadiosignalfromaBroadcastradiostation,thenamplifythesignalandtreatitwithsuitableelectroniccomponents. Giovanni ... philcollin 2022-07-0507:17:52 Iamnotsurewhereyouarethinkingofputtingthistransformer.Soundslikeyouaretryingtofigureouthowtousethe20Acapable(but220V)devicetomonitor110Vloads,yes?Somaybeyouwanttoputthe220Vdevicebetweenthe220Vsupplyandastepdowntransformertothe110Vloads?... ScottSwaaley 2022-06-2811:35:52 HiEve,It'sdefinitelypossible(butnotprobable)thattheVFDisonlyusingtwo-phasesofthesupplyduringthebrakingoperation.Ifitwere,theDCitgeneratescouldbeflowingthrougheithertwoorthreeofthephaseconnectionstothemotor,dependingonhowtheVFDisdesigned.Typicallythough,aVFDisgeneratingDCusingallthreephasesduringnormaloperation(anditchopsupthisDCtorunthemotor).Thenwhenitwantstobrake,itstopschopping(orchopsdifferently)andjustprovidesDCtomakethemotorstop.Allthistosay... david-ashton 2022-06-2702:46:35 John...youcangetcrystaloscillatormodulesupto100MHz+(Ijusttodaysawoneonaboardat125MHz).Theywouldhaveanoutputwithareasonablysquarewave,Youcanlooksomeuponsupplierssitesandmayfindadatasheetthatwillgiveyoumoreinfo.AtthosefrequenciestheriseandfalltimeswouldbeofsomeimportanceIwouldthink,agooddatasheetwouldspecifythem.Oneisawherehad5nsriseandfalltimes https://www.farnell.com/datasheets/3161551.pdf... richard-gabric 2022-06-2702:46:34 Furthertomypreviouscomment,youcouldtrysomethingliketheSi5351A,theseareavailablefromanumberofsourcesonabreakoutboard(googlethepartnumber),soreadytouse.Hasa1nSecriseandfalltime,andhastobeprogrammedusingI2C.Notmuchdrivecapability,andonlyalogiclevelout,somypreviouscommentstandsregardingthedrivecapabilityyouneed.Again,atthesefrequencies,togetatruesquarewaveisnottrivialifyouareunfamiliarwithworkingatthespecifiedriseandfalltimes. Cheers, Richard... BrowsebyCategories AnalogDesign(503) BatteriesandPowerSupplies(864) DigitalDesign(513) EmbeddedSystems(1187) Featured(5984) General(1635) IndustryVideos(785) PowerDesign(1469) SliderArticle(716) Standard(1532) StandardandSpecialtyLogic(413) Test&Measurement(360) BrowsebyTopics Analog(169) Automotive(181) Controller(181) Design(400) Electronics(186) Embedded(180) LED(299) LEDDriver(162) MCU(202) Power(778) Sensor(323) Voltage(192) Advertisement Weusecookiesonourwebsitetogiveyouthemostrelevantexperiencebyrememberingyourpreferencesandrepeatvisits.Byclicking“AcceptAll”,youconsenttotheuseofALLthecookies.However,youmayvisit"CookieSettings"toprovideacontrolledconsent.CookieSettingsAcceptAllManageconsent Close PrivacyOverview Thiswebsiteusescookiestoimproveyourexperiencewhileyounavigatethroughthewebsite.Outofthesecookies,thecookiesthatarecategorizedasnecessaryarestoredonyourbrowserastheyareessentialfortheworkingofbasicfunctionalitiesofthewebsite.Wealsousethird-partycookiesthathelpusanalyzeandunderstandhowyouusethiswebsite.Thesecookieswillbestoredinyourbrowseronlywithyourconsent.Youalsohavetheoptiontoopt-outofthesecookies.Butoptingoutofsomeofthesecookiesmayhaveaneffectonyourbrowsingexperience. Necessary Necessary AlwaysEnabled Necessarycookiesareabsolutelyessentialforthewebsitetofunctionproperly.Thesecookiesensurebasicfunctionalitiesandsecurityfeaturesofthewebsite,anonymously. CookieDurationDescriptioncookielawinfo-checkbox-analytics11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookieisusedtostoretheuserconsentforthecookiesinthecategory"Analytics".cookielawinfo-checkbox-functional11monthsThecookieissetbyGDPRcookieconsenttorecordtheuserconsentforthecookiesinthecategory"Functional".cookielawinfo-checkbox-necessary11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookiesisusedtostoretheuserconsentforthecookiesinthecategory"Necessary".cookielawinfo-checkbox-others11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookieisusedtostoretheuserconsentforthecookiesinthecategory"Other.cookielawinfo-checkbox-performance11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookieisusedtostoretheuserconsentforthecookiesinthecategory"Performance".viewed_cookie_policy11monthsThecookieissetbytheGDPRCookieConsentpluginandisusedtostorewhetherornotuserhasconsentedtotheuseofcookies.Itdoesnotstoreanypersonaldata. Functional Functional Functionalcookieshelptoperformcertainfunctionalitieslikesharingthecontentofthewebsiteonsocialmediaplatforms,collectfeedbacks,andotherthird-partyfeatures. Performance Performance Performancecookiesareusedtounderstandandanalyzethekeyperformanceindexesofthewebsitewhichhelpsindeliveringabetteruserexperienceforthevisitors. Analytics Analytics Analyticalcookiesareusedtounderstandhowvisitorsinteractwiththewebsite.Thesecookieshelpprovideinformationonmetricsthenumberofvisitors,bouncerate,trafficsource,etc. Advertisement Advertisement Advertisementcookiesareusedtoprovidevisitorswithrelevantadsandmarketingcampaigns.Thesecookiestrackvisitorsacrosswebsitesandcollectinformationtoprovidecustomizedads. Others Others Otheruncategorizedcookiesarethosethatarebeinganalyzedandhavenotbeenclassifiedintoacategoryasyet. SAVE&ACCEPT



請為這篇文章評分?