Skip to content
Bit operationsReference

bit.ror

Rotate bits to the right.

Details#

Rotate bits to the right. A number in 0…4294967295 representing an unsigned 32-bit result.

Signature#

Luau
bit.ror(value: number, count: number): number

Parameters#

ParameterTypeDescription
valuenumberNumber converted to 32 bits.
countnumberCount converted to uint32 and masked with 31, so 32 means 0.

Returns#

A number in 0…4294967295 representing an unsigned 32-bit result.

Examples#

Local example

Luau
print(bit.ror(16, 4)) -- 1