BitAnd
BitAnd( value_1, [ value_2, ... ] )
BitAnd( value_1, [ value_2, ... ] )
BitAnd( value_1, [ value_2, ... ] )
BitAnd( value_1, [ value_2, ... ] )
bitand( value_1, [ value_2, ... ] )
BitAnd( value_1, [ value_2, ... ] )
Description
The BitAnd
function returns the bit to the result if the bit
exists in all numbers. The arguments must be numbers, and fractional
values are truncated before the operation is applied. The result is the
bitwise AND of all the arguments.
Returns
A Number which is the bitwise AND of all supplied value
s.
Examples
The following query executes an array of independent bitwise AND operations and returns the answer in the result array. The result array position matches the position in the execution array.
Arr(LongV(7), LongV(0), LongV(0), LongV(1), LongV(3))
[7 0 0 1 3]
[7, 0, 0, 1, 3]
[ 7, 0, 0, 1, 3 ]
[7, 0, 0, 1, 3]
[ 7, 0, 0, 1, 3 ]
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!