The Basics of Digital LogicThere are several other types of gates that are used in computer design, but these can all be replaced by combinations of AND, OR, and NOT gates. One commonly encountered gate is the Exclusive-OR gate, which is also known as the XOR gate. Click on the following button to see the symbol for the XOR gate. Note that it looks very much like the symbol for the OR gate, except for the extra curved line drawn across the inputs.
As the simulation shows, the output of the XOR gate is equal to 1 if a single input is equal to 1, and equal to 0 if the inputs are both 1 or both 0. The rules for XOR gates with more than two inputs are slightly different. If an even number of inputs are equal to 1 (including zero inputs), then the output is equal to zero. If an odd number of inputs are equal to 1, then the output is equal to 1. In practice, XOR gates with more than two inputs are extremely rare. You should look at both the XOR gate and its AND, OR, NOT equivalent. Try both circuits with all four inputs to verify that they produce the same output values at the primary output symbol. When you are finished with this, click here to go to the next lesson.