The XOR (exclusive OR) operation is a basic Bitwise Function / Logic Function used in programming and digital electronics.
How It Works
The XOR operation compares two bits:
- If the bits are the same, the result is 0.
- If the bits are different, the result is 1.
Truth Table
| A | B | A XOR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |