I am doing some revision for开发者_开发百科 my exams and one of the questions that frequently asked in last year question paper is how to realize a OR gate using only XOR gates. I am trying to do from last 1 hour and also searched on Internet. But failed. Hope to get some help here.
You can't derive an OR (or AND, NOR, NAND) gate from only XOR (or XNOR) gates, because they are not universal gates.
Here is an argument against XOR and XNOR as universal gates.
An XOR gate is a parity generator. Cascading parity generators always produce parity generators. AND and OR are not parity functions.
An XOR gate can be used as an inverter. An XNOR gate is an XOR followed by an inverter, so it is also a parity generator.
To be an universal gate, a gate needs to satisfy both the following conditions:
- You should be able to create an inverter using the gate.
- You should be able to block the input (i.e. setting N - 1 inputs to 0 or 1, the remaining input is ignored)
Tie both input lines to only one input pin of the XOR gate, leaving the other input pin as always being false, thus producing an OR gate.
精彩评论