Another interesting bit of logic, which can also be made from NAND gates, is the XOR or eXclusive OR gate. It turns on only when its two inputs are different. This provides the basic ability for a computer to tell when things are not equal. If you add an inverter to the output, you get an XNOR gate, which turns on only when its two inputs are the same; giving the computer the ability to know when two different values match.
If you can't see the Java based simulation below, try this HTML version of the Falstad simulator: XOR and XNOR
RS Flip Flop How computers learn and remember
Joe Watson points out that if you invert one of the two inputs to an XOR gate, that has exactly the same effect as inverting it's output! This can be quite useful, as we are often comparing the output of two registers, made from flip-flops, which have both standard and inverted outputs. Using the already inverted output from one set of registers allows us to avoid needing an inverter on the output of the XOR gate. Joe is full of tricks, including a comparison circuit that doesn't even need logic gates; just resistors, diodes, and a couple transistors to compare almost any number of bits: http://www.angelfire.com/oh3/ebjoew/Drum_Memory_Story.html
|file: /Techref/logic/xor.htm, 3KB, , updated: 2016/7/6 12:08, local time: 2018/3/19 23:27,
|©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.sxlist.com/techref/logic/xor.htm"> Digital Logic Tutorial, XOR, XNOR</A>
|Did you find what you needed?|
Welcome to sxlist.com!
& kind contributors
just like you!
Please don't rip/copy
Copies of the site on CD
are available at minimal cost.
Welcome to www.sxlist.com!