Skip to main content
Version: Next

bit_and

Computes the bit-wise AND of its arguments.

bit_and(lhs:number, rhs:number) -> number

Description

The bit_and function computes the bit-wise AND of lhs and rhs. The operation is performed on each corresponding bit position of the two numbers.

lhs: number

The left-hand side operand.

rhs: number

The right-hand side operand.

Examples

Perform bit-wise AND on integers

from {x: bit_and(5, 3)}
{x: 1}

See Also

bit_or, bit_xor, bit_not, shift_left, shift_right