Function Reference
BitAND
Performs a bitwise AND operation.
Parameters
| value1 |
The first number. |
| value2 |
The second number. |
| value n |
[optional] The nth number - up to 255 values can be specified. |
Return Value
Returns the value of the parameters bitwise-AND'ed together.
Bit operations are performed as 32-bit integers.
Remarks
Remember hex notation can be used for numbers.
BitAND returns 1 in each bit position where all input arguments have a 1 in the corresponding
position and 0 in all others,
Related
BitNOT, BitOR, BitShift, BitXOR, Hex, BitRotate
Example
Local $x = BitAND(13, 7) ;x == 5 because 1101 AND 0111 = 0101
$x = BitAND(2, 3, 6) ;x == 2 because 0010 AND 0011 AND 0110 = 0010