BITXOR

Formulas / BITXOR
Return a decimal number representing the bitwise XOR of two numbers.
`BITXOR(number1, number2)`
• number1 - a number that is not less than 0
• number2 - a number that is not less than 0

Examples

• `=BITXOR(TRUE,FALSE)`

The BITXOR function is often used as a logical operator, where TRUE is equal to 1 and FALSE is equal to 0. For example, this formula returns 1. This is because when the TRUE value is compared to FALSE at the bit level, the result is a 1.

• `=BITXOR(5,3)`

The BITXOR function can also be used to compare two numbers and return the total of the bitwise "Exclusive Or" comparison at each bit position. For example, this formula returns 6. This is because when the 5 value is compared to 3 at the bit level, the result is a 6.

• `=BITXOR("hello","world")`

The BITXOR function can also be used to compare two strings and return the total of the bitwise "Exclusive Or" comparison at each bit position. For example, the formula above returns 8. This is because when the "hello" string is compared to "world" at the bit level, the result is an 8.

• `=BITXOR(A1:A4,B1:B4)`

The BITXOR function can also be used to compare two arrays and return the total of the bitwise "Exclusive Or" comparison at each bit position. For example, this formula returns 9. This is because when the values in A1:A4 are compared to the values in B1:B4 at the bit level, the result is a 9.

Summary

The BITXOR function is a mathematical tool that enables the logical XOR operation to be performed on the binary values of two positive decimal numbers. It returns a decimal number as the result.

• The BITXOR function takes two positive decimal numbers as arguments and performs a logical XOR operation on each bit in the numbers, returning a decimal number representing the bitwise XOR result.
• The BITXOR function does not take any additional arguments.