BITXOR Function in Excel

In this post, you will learn about the BITXOR function, the formula syntax, and usage of the function in Microsoft Excel.

BITXOR Function in Excel

The BITXOR function in Microsoft Excel performs the XOR operation between two decimal numbers in its binary form and returns a decimal number. i.e., for every bit in the binary representation of the numbers, a logical XOR operation is performed.

Syntax

=BITXOR( number1, number2)

Arguments:

Number1   

This should be in decimal form and greater than or equal to 0.

Number2   

 This should be in decimal form and greater than or equal to 0.

Available versions

Excel 2013 and higher

Possible Errors

  • When any of the argument is less than 0, BITXOR returns the #NUM! error value.
  • When any of the argument is a non-integer or is greater than (2^48)-1, BITXOR returns the #NUM! error value.
  • When any of the argument is a non-numeric value, BITXOR returns the #VALUE! error value.

How to use BITXOR in excel worksheet?

Using this function in a WS is simple; all you need to do is enter the function as a formula of the cell in the formula bar.

Take a look at the given example

Decimal numbers:

Number 1Number 2
242117
45217
104317
52417
451516
-158217

The above numbers are the binary version of some decimal numbers. To find out the BIT wise XOR of the two numbers, Enter the given decimal numbers in column A and column B, enter the following formula in column C,

Formula: =BITXOR (A1, B1)

Here, A1 and B1, refers to the cell name or the cell address. Repeat the same to the other cells and you will get the Bitwise XOR of the two decimal numbers.

Internally, the function converts the decimal numbers into its binary values and performs the XOR operation and gives the result in decimal numbers.

From the Cell A6 and B6, you can find that the corresponding value is #NUM! error, that is due to the presence of negative values or values less than 0.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this article, you will learn about the SKEW.P function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the SKEW function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the RANK.EQ function, the formula syntax and usage of the function in Microsoft...
  • Excel
  • November 23, 2021