| Switch A | Switch B | LED |
| 0 | 0 | 0 |
| 1 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 1 | 0 |
An Exclusive OR (XOR) gate outputs “TRUE” whenever either of its two inputs inputs are true, but not both.
The truth table for a two-input XOR gate is shown at right, with 0 = false, 1 = true.
The switch designations and positions should be familiar. They correspond to the two-switch LED Circuit explored in Simple LED Circuit: Challenge #3.
Dynamic Simulation in ICircuit
The short video shows how an electronic XOR gate can be switched with voltage levels, 5 volts equal to “1” or TRUE and 0 volts equal to “0” or FALSE. You should see that the LED is powered (blue trace) and lit whenever either input A (yellow trace) or input B (green trace) are at 5 volts, but not both.