the BITAND function

Contents

Welcome back to our frequent blog of Excel functions from A to Z. Today we look at the BITAND function.

The BITAND function

Now is better. In conclusion, We got to the functions your typical Excel user uses all the time. No.

This function returns a 'Y’ bit by bit of two numbers. For those of us without PhDs in IT, this means that the The value of each bit position (the respective number that is read from right to left when represented in binary) is counted only if the bits of both parameters in that position are 1.

The BITAND The function uses the following syntax to operate:

The BITAND The function has the following arguments:

  • number 1: this is mandatory and must be in decimal format, greater or equal to 0
  • Number 2: additionally required. This must also be in decimal form and be greater than or equal to 0.

It should be noted at the same time that:

  • BITAND returns a decimal number
  • the result is bit by bit ‘Y‘Of its parameters
  • the value of each bit position is counted only if the bits of both parameters at that position are 1
  • the return values ​​of 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 any of the arguments is less than 0, BITAND return the #ON ONE! error value
  • if any of the arguments is a non-integer or is greater than (2 ^ 48) -1, BITAND return the #ON ONE! error value
  • if any of the arguments is a non-numeric value, BITAND return the #VALUE! error value.

Please, see my example below:

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.