Parts, tools and supplies for the electronics experimenter.
An electronic XOR (Exclusive OR) gate performs the digital logic XOR function. This function is generally similar to the standard OR function with one critical difference. For both OR and XOR, the output is high when either of the two inputs are high, and when both inputs are low, the output is low. However when both inputs are high, the standard OR circuit will be high but the XOR circuit will be low. A quick look at an implementation of an OR gate reveals that this difference adds a good deal of complexity to the circuit. As can be seen in the logic diagram below, the XOR gate is built by combining three more simple gates, the OR gate, the NAND gate and the AND gate to produce the desired result.
The example transistor XOR gate circuit is implemented here using PN2222A NPN transistors (a variant of the 2N2222A) but many common NPN bipolar junction transistors could be substituted.
(All parts for the project are available in our store.)
In | Out | |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |