xor logic code example
Example 1: XOR
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0
ONLY ONE CAN BE TRUE
Example 2: xor gate
XOR gate
0 0 = 0
1 0 = 1
0 1 = 1
1 1 = 0
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0
ONLY ONE CAN BE TRUE
XOR gate
0 0 = 0
1 0 = 1
0 1 = 1
1 1 = 0