This article describes the formula syntax and usage of the BITXOR function (function: A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet
This article describes the formula syntax and usage of the BITXOR function (function: A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex calculations.) in Microsoft Excel.
Returns a bitwise 'XOR' of two numbers.
The BITXOR function syntax has the following arguments.
- Number1 Required. Must be greater than or equal to 0.
- Number2 Required. Must be greater than or equal to 0.
- BITXOR returns a decimal number that is the result of the sum of a bitwise 'XOR' (exclusive XOR) of its parameters.
- If either argument is outside its constraint, BITXOR returns the #NUM! error value.
- If either argument is greater than (2^48)-1, BITXOR returns the #NUM! error value.
- If either argument is a non-numeric value, BITXOR returns the #VALUE! error value.
- In the result, each bit position is 1 if the values of the parameters at that bit position are not equal; in other words, one value is 0 and the other is 1. For example, using BITXOR(5,3), 5 is expressed as 101 in binary and 3 as 11 in binary. To help with comparison, you can consider 3 as 011. From right to left, the bit values at the three positions in this examp