BITXOR Function in Excel – Bitwise XOR Operation in Excel

BITXOR Function in Excel returns the bitwise Exclusive OR, ‘XOR’ for two supplied integers.

Note: BITXOR Function was only introduced from Excel 2013 onwards

Bitwise XOR Explained

Let us find the bitwise XOR operation of two integers 12 and 25.

12 = 00001100 (In Binary)
25 = 00011001 (In Binary)

Bitwise XOR Operation of 12 and 25

00001100
| 00011001
________
00010101 = 21 (In decimal)

 

Syntax of BITXOR Function in Excel (BITWISE XOR OPERATION IN EXCEL):

BITXOR(number1,number2)

Where the supplied number arguments are positive integers

 

Example of BITXOR Function in Excel (BITWISE XOR OPERATION IN EXCEL):

FORMULA:

BITXOR Function in Excel 1

RESULT:

BITXOR Function in Excel 2

NOTE: #NUM!   – Error occurs if

  • One or both of the supplied number arguments is a non-integer;
  • One or both of the supplied number arguments is negative or is greater than (2^48)-1.

previous BITXOR Function in Excel                                                                                                                next BITXOR Function in Excel