Verify XOR Gate Incorrectness on Wikipedia - Expert Help Needed

  • Thread starter Thread starter PsychonautQQ
  • Start date Start date
  • Tags Tags
    Gate
AI Thread Summary
The discussion centers on the correctness of the XOR gate representation on Wikipedia, specifically questioning the truth table provided. The user argues that the current depiction leads to an incorrect output, suggesting that when both inputs are 0 or both are 1, the output should be 1, which contradicts the standard XOR definition. They explain that the configuration of NAND gates in the diagram effectively functions as an OR gate followed by an AND gate, which should yield the correct XOR behavior. The correct truth table for XOR indicates that the output is 1 only when one input is high and the other is low. The conversation emphasizes the need for verification of the Wikipedia article's accuracy regarding the XOR gate.
PsychonautQQ
Messages
781
Reaction score
10
http://en.wikipedia.org/wiki/XOR_gate
scroll down a little bit on this article and there is a picture labeled "xor gate made out of nands"

Can somebody verify that this wikipedia article is incorrect for me? The truth table I came up with is the exact opposite of an xor. When a and b are both 0 then the output is 1 and when a and b are both 1 the output is 1, but when a is 1 and b is 0 the output is 0.
 
Engineering news on Phys.org
It's a XOR. Easy enough to analyze. Take the last NAND gate with the inversions on inputs from previous NAND gates. So the last NAND becomes an OR gate (by De Morgan's), and the two NANDs before it become ANDs. So now if A AND B, then the input to the two AND gates is zero, and the whole thing is zero. Otherwise, A AND gate is high if A, and B AND is high if B. So the OR gate gets A OR B. So the whole thing reads (A OR B) AND (A NAND B). That's obviously a XOR.
 
so as an xor gate, if b is 1 and A is zero the output should be one,... right?
 
Of course. The states of the four NANDS are going to be: Leftmost, 0 NAND 1 = 1. Top, 0 NAND 1 = 1. Bottom, 1 NAND 1 = 0. Rightmost, 0 NAND 1 = 1. And that's your output.
 
PsychonautQQ said:
so as an xor gate, if b is 1 and A is zero the output should be one,... right?

Yup

Code:
A B  |  XOR Result
0  0 |  0 
0  1 |  1
1  0 |  1
1  1 |  0
 
In words - XOR = one or the other but not both
 
PsychonautQQ said:
so as an xor gate, if b is 1 and A is zero the output should be one,... right?

Exclusively or so only (or exclusively) either input can be high and the other has to be low. If both inputs are high your output is low and if both inputs are low your output is low.
 

Similar threads

Back
Top