BITXOR function

BITXOR function

BITXOR function has been introduced with Excel 2013 and this function returns the bitwise XOR of two numbers.

For example, Binary representation of 10 is 1010 and Binary representation of 7 is 111 and if we compare which positions are not equal we will get :-

1010

0111

-------

yyny

4301

so that means 1*(2^3)+1*(2^2)+1*(2^0) = 8+4+1=13

so if we use the formula directly as =BITXOR(10,7) will get the similar result as 13.

 

Syntax:-

BITXOR(number1, number2)

 

where number1 and number2 must be greater than or equal to zero.

 

Note: you will get #NUM! error if the either of the two number is greater thatn (2^48)-1 and you will get #VALUE error if either of the two number are non-numeric

Leave a Reply

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

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube