XOR and XNOR - Digilent Reference
文章推薦指數: 80 %
4. The truth table, derived directly from the XOR truth table, uses an XOR gate with one input tied to a signal named “control”. When control ... Shop Reference AnNICompany ToggleNavigation InternalTools PageTools ShowpagesourceOldrevisionsBacklinksSiteTools RecentChangesSitemapMediaManagerUserTools LogIn BoardsandComponents FPGA/SoCDevelopmentBoards ArtyA7 ArtyS7 ArtyZ7 Basys3 CmodA7 CmodS7 CoraZ7 EclypseZ7 Genesys2 GenesysZU NexysA7 NexysVideo USB104A7 ZedboardZynq-7000DevelopmentBoard ZyboZ7 SeeAll Programmers SeeAll ExpansionModules Zmods ZmodScope1410 ZmodAWG1411 SeeAll Pmods SeeAll Pcams FMCPcamAdapter Pcam5C MCUBoards BasysMX3 Max32 uC32 WF32 Wi-Fire SeeAll TestandMeasurementEquipment USBScopes,AnalyzersandSignalGenerators AnalogDiscovery2 AnalogDiscoveryPro(ADP5250) AnalogDiscoveryPro(ADP3450/ADP3250) AnalogDiscoveryStudio DigitalDiscovery SeeAll Software WaveForms WaveFormsLive AdaptersandCanvases AudioAdapter BNCAdapter BreadboardBreakout BreadboardAdapter ImpedanceAnalyzerAdapter TransistorTesterAdapter BlankCanvas BreadboardCanvas InterposerCanvas Software DigilentSoftware Adept2 WaveForms WaveFormsSDK SeeAll | Blog Forum Projects DigilentGithub Youarehere:: DigilentReferenceLearnFundamentalsDigitalLogicXORandXNOR XORandXNOR TheExclusiveOR(orXOR)relationship$F=A\oplusB$isdefinedbythetruthtablesshowninFig.1andtheequivalenttwo-variablelogicexpressions$F_{SOP}=A\cdot\overline{B}+\overline{A}\cdotB$and$F_{POS}=(A+B)\cdot(\overline{A}+\overline{B})$. TheXORfunctionisfrequentlyusedindigitalcircuitstomanipulatesignalsthatrepresentbinarynumbers—thesecircuitswillbepresentedinalatermodule.Fornow,notetheXORoutputisassertedwheneveranoddnumberofinputsareasserted.This“odddetector”natureoftheXORrelationshipholdsforanynumberofinputs. CompoundXORfunctionslike$F=A\oplus(B\cdotC)$canalwaysbewritteninanequivalentSOPorPOSforms: $F_{SOP}=A\cdot\overline{B\cdotC}+\overline{A}\cdot(B\cdotC)$and$F_{POS}=(A+B\cdotC)\cdot(\overline{A}+\overline{B\cdotC})$ TheXNORfunctionistheinverseoftheXORfunction.Sincetheoutputofa2-inputXNORisassertedwhenbothinputsarethesame,itissometimesreferredtoastheEquivalencefunction(EQV),butthisnameismisleadingbecauseitdoesnotholdforthreeormorevariables(i.e.,theoutputofa3-inputXNORisnotassertedwheneverallthreeinputsarethesame).Truthtablesfor2and3inputXNORfunctionsareshowninFig.2,anditcanbeseenthatforeachcombinationofinputs,theoutputistheinverseoftheXORtruthtablesabove.TheExclusiveNOR(orXNOR)relationship$F=\overline{A\oplusB}$showninthetruthtableshastheequivalenttwo-variablelogicexpressions: $F_{SOP}=\overline{A}\cdot\overline{B}+A\cdotB$and$F_{POS}=(\overline{A}+B)\cdot(A+\overline{B})$ IfeithertheAorBinputsareintheXNORtruthtableinverted,thenXORoutputsareproduced;thatis,$F=\overline{A\oplusB}$producesthesamelogicoutputas$F=\overline{A}\oplusB$or$F=A\oplus\overline{B}$.IfboththeAandBinputsareinverted,XNORoutputsarestillproduced:$F=\overline{A\oplusB}$producesthesameoutputas$F=\overline{\overline{A}\oplus\overline{B}}$.ThissamepropertyholdsfortheXORfunction—invertinganysingleinputvariablewillresultinXNORfunction,andinvertingtwoinputswillagainproducetheXORfunction.Infact,thispropertycanbegeneralizedtoXOR/XNORfunctionsofanynumberofinputs:anysingleinputinversionchangesthefunctionoutputbetweentheXORandXNORfunctions;anytwoinputsignalinversionsdoesnotchangefunctionoutputs;anythreeinputsignalinversionschangesthefunctionoutputbetweentheXORandXNORfunctions,etc.Moresuccinctly,invertinganoddnumberofinputschangesanXORtoanXNORandvice-versa,invertinganevennumberofinputschangesnothing,andinvertingtheentirefunctionhasthesameeffectasinvertingasingleinput.Somerepresentativecasesareshown. $$\begin{align} F=\overline{A\oplusB\oplusC}&\iffF=\overline{A}\oplusB\oplusC &\iffF=\overline{A}\oplus\overline{B}\oplus\overline{C}\\ F=A\oplusB\oplusC&\iffF=\overline{A}\oplus\overline{B}\oplusC &\iffF=\overline{A\oplus\overline{B}\oplusC}\end{align}$$ AnevenmoresuccinctdescriptionoftheXORandXNORfunctionoutputscanbedrawnfromthepropertiesdiscussed.TheXORoutputisassertedwheneveranoddnumberofinputsareasserted,andtheXNORisassertedwheneveranevennumberofinputsareasserted:theXORisanodddetector,andtheXNORanevendetector.Thisveryusefulpropertywillbeexploitedindataerrordetectioncircuitsdiscussedlater. XORandXNORgatesymbolsareshownbelowinFig.3.CMOScircuitsforeitherfunctioncanbecanbuiltfromjust6transistors,butthosecircuitshavesomeundesirablefeatures.Moretypically,XORandXNORlogicgatesarebuiltfromthreeNANDgatesandtwoinverters,andsotake16transistors. AusefulapplicationoftheXORfunctionisthe“controlledinverter”circuitillustratedbelowinFig.4.Thetruthtable,deriveddirectlyfromtheXORtruthtable,usesanXORgatewithoneinputtiedtoasignalnamed“control”.Whencontrolisa'1'theinputAisinverted,butwhencontrolisa'0'Aissimplypassedthroughthelogicgatewithoutmodification.Thiscontrolledinversionfunctionwillbeusefulinlaterwork. ImportantIdeas TheXORoutputisassertedwheneveranoddnumberofinputsareasserted,andtheXNORisassertedwheneveranevennumberofinputsareasserted:theXORisanodddetector,andtheXNOR,anevendetector. AnyoddnumberofinputinversionchangesthefunctionoutputbetweentheXORandXNORfunctions;anyevennumberofinputsignalinversionsdoesnotchangefunctionoutputs;anythreeinputsignalinversionschangesthefunctionoutput Xorgatecanbeusedasa“controlledinverter”. learn, fundamentals, digital-logic, xor, xnor
延伸文章資訊
- 1XOR and XNOR - Digilent Reference
4. The truth table, derived directly from the XOR truth table, uses an XOR gate with one input ti...
- 2Exclusive OR Gate: Definition, Symbol and truth table of XOR ...
- 3Exclusive-OR Gate Tutorial with Ex-OR Gate Truth Table
The two-input “Exclusive-OR” gate is basically a modulo two adder, since it gives the sum of two ...
- 4LOGIC GATES
- 5XOR Gate Truth Table
Practically three or more input XOR gate does not exist. But when more than two variables are XOR...