Modifying this control will update this page automatically

BITXOR

The BITXOR function returns the bitwise XOR of two numbers.

BITXOR(value-1, value-2)

value-1: The first number. value-1 must be an integer.

value-2: The second number. value-2 must be an integer.

Notes

  • Values can be in any order and return the same result.

  • The truth table for BITXOR is below:

value-1

value-2

BITXOR(value-1, value-2)

0

0

0

0

1

1

1

0

1

1

1

0

Examples

=BITXOR(9.13) returns 4. The binary equivalent of 9 is 1001, and the binary equivalent of 13 is 1101; the bits are not equal at the third position from the right, which returns (1*(2^2)), or 4.

=BITXOR(12.3) returns 15. The binary equivalent of 12 is 1100, and the binary equivalent of 3 is 11 (which can also be represented as 0011); the bits are not equal at any position. This returns (1*(2^0))+(1*(2^1))+(1*(2^2))+(1*(2^3)), or 15.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
Helpful?
Character limit: 250
Maximum character limit is 250.
Thanks for your feedback.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.