Gates: XOR | |||||||||||||||
XOR gate: implements exclusive-OR function | |||||||||||||||
Input: 2 bits | |||||||||||||||
Output: 1 bit | |||||||||||||||
Truth table: | Symbol: | ||||||||||||||
Input | Output | ||||||||||||||
x0 | x1 | z | |||||||||||||
0 | 0 | 0 |
|
||||||||||||
0 | 1 | 1 | |||||||||||||
1 | 0 | 1 | |||||||||||||
1 | 1 | 0 | |||||||||||||
z = x0 ^ x1 | |||||||||||||||
Properties: | |||||||||||||||
symmetric: | x ^ y = y ^ x | ||||||||||||||
associative: | (x ^ y) ^ z = x ^ (y ^ z) | ||||||||||||||
n inputs: | |||||||||||||||
XORn (x0, x1, . . . , xn) = x0 ^ x1 ^ . . . xn | |||||||||||||||