Syntax
| Parameter | Description |
|---|---|
| number1 | Parameter of the BITXOR function. |
| number2 | Parameter of the BITXOR function. |
Examples
Basic XOR operation
=BITXOR(5, 3)
Toggle a flag
=BITXOR(7, 2)
Simple checksum
=BITXOR(BITXOR(65, 66), 67)
Common Errors
One or both numbers is negative, or exceeds 2^48 - 1.
A non-numeric argument was provided.
Tips
XOR flips specific bits: BITXOR(value, mask). Apply the same XOR twice to get the original value back — this is the basis of XOR encryption.
BITXOR(x, x) = 0 for any x. Every bit matches, so all results are 0. This property is used in algorithms to detect duplicates.
BITXOR highlights which bits differ between two values. A result of 0 means the values are identical. Non-zero means they differ.
Try BITXOR in Viztab
Import your data and use BITXOR with 370+ other formulas. No signup required.
Open Viztab