BITAND (Number1, Number2) BITAND (Number1; Number2)

Number1

Number Number

The first number.

Number2

Number Number

The second number.

Returns

Number Number

The result of the bitwise operation.

Performs a bitwise AND operation on two numbers. A binary digit of the result is 1 if the binary digits in the same position of both numbers are 1, and 0 otherwise.

Both numbers must be non-negative integers less than 2 raised to the power of 48. Other numbers result in an error.

Examples

DEC2BIN ( BITAND ( BIN2DEC ("00010011"), BIN2DEC ("00011000")), 8)
DEC2BIN ( BITAND ( BIN2DEC ("00010011"); BIN2DEC ("00011000")); 8)

Returns "00010000".

BITAND (19, 24)
BITAND (19; 24)

Returns 16. This example is equivalent to the preceding example, but does not convert the decimal numbers to binary to ease readability.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell