Skip to content

shift_right

Performs a bit-wise right shift.

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

The shift_right function performs a bit-wise right shift of lhs by rhs bit positions. Each right shift divides the number by 2, truncating any fractional part.

The number to be shifted.

The number of bit positions to shift to the right.

from {x: shift_right(20, 2)}
{x: 5}

shift_left, bit_and, bit_or, bit_xor, bit_not