Performs a bitwise AND operation.
BitAND ( value1, value2 [, value n] )
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.
Remarks
Remember hex notation can be used for numbers.
Related
BitNOT, BitOR, BitShift, BitXOR, Hex
Example
$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