Engineering - BITAND Function



Description

The BITAND function returns a bitwise 'AND' of two numbers.

Syntax

BITAND (number1, number2)

Arguments

Argument Description Required/ Optional
number1 Must be in decimal form and greater than or equal to 0. Required
number2 Must be in decimal form and greater than or equal to 0. Required

Notes

  • BITAND returns a decimal number.

  • The result is a bitwise 'AND' of its parameters.

  • The value of each bit position is counted only if both parameter's bits at that position are 1.

  • The values returned from the bit positions progress from right to left as powers of 2. The rightmost bit returns 1 (2^0), the bit to its left returns 2 (2^1), and so on.

  • If either argument is less than 0, BITAND returns the #NUM! Error value.

  • If either argument is a non-integer or is greater than (2^48)-1, BITAND returns the #NUM! Error value.

  • If either argument is a non-numeric value, BITAND returns the #VALUE! Error value.

Applicability

Excel 2013, Excel 2016

Example

BITAND Function
advanced_excel_engineering_functions.htm
Advertisements