An XOR gate combines two inputs and returns TRUE only if one of the inputs is TRUE and the other is FALSE.

Input 1Input 2Output
Input 1
0
Input 2
0
Output
0
Input 1
0
Input 2
1
Output
1
Input 1
1
Input 2
0
Output
1
Input 1
1
Input 2
1
Output
0