A XOR Gate (Exclusive OR) is a 2 input basic logic element. The truth table is given below. It returns a logic high state when only 1 input is high, else a low state.

Truth Table

edit
Input A Input B Output X
0 0 0
0 1 1
1 0 1
1 1 0

Alternative Interpretation

edit

An alternative interpretation is to view a XOR Gate as a controlled inverter. If 1 input is viewed as control input and 1 input as signal input, you can propagate the signal to the output if the control input is low. If the control input is high you will get the inverted signal at the output.