BITAND Functions

how to use bitand function


BITAND is a bitwise operation which returns a decimal number of two bitwise AND operation.

Syntax


=BITAND(number1, number2)

Arguments

number1: First numerical value for BITAND operation 
number2: Second numerical value for BITAND operation


Behavior


We have taken an example for bitwise operation first four numbers are shown how operation perform in bitwise AND

If number 1 and number 2 both are "1" than BITAND returns "1" otherwise it will return "0"

in last row you can see we have taken number1 as "11" and number 2 as "12" and BITAND returns "8".

See How                                             8 4 2 1
in the binary system, 11 is written as 1 0 1 1
and                            12 is written as 1 1 0 0 
So here BITAND Function will give you the number where both "1" is present it is"8"

Usage


BITAND is used to bitwise calculation in digital programming.


Returns

Decimal number evaluated by bitwise operation


Note:

Number1 and number 2 should not be greater than (2^48)-1

No comments:

Post a Comment