BITAND Function in Excel – Bitwise AND Operation in Excel

BITAND Function in Excel returns the bitwise ‘AND’ for two supplied integers.

Note: BITAND Function was only introduced from Excel 2013 onwards

Bitwise AND ExplainedLet us find the bitwise AND operation of two integers 12 and 25.

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

Bitwise AND Operation of 12 and 25

00001100
& 00011001
________
00001000 = 8 (In decimal)

 

Syntax of BITAND Function in Excel (BITWISE AND OPERATION IN EXCEL):

BITAND(number1,number2)

Where the supplied number arguments are positive integers

 

Example of BITAND Function in Excel (BITWISE AND OPERATION IN EXCEL):

FORMULA:

BITAND Function in Excel 1

RESULT:

BITAND 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 BITAND Function in Excel                                                                                                                next BITAND Function in Excel