@technobuddha > library > Binary > Arithmetic
Function: rotr()
ts
function rotr(num: number, bits: number): number;Defined in: rotr.ts:10
Rotates the bits of a 32-bit number to the right by a specified number of bits.
Parameters
| Parameter | Type | Description |
|---|---|---|
num | number | The 32-bit integer to rotate. |
bits | number | The number of bits to rotate to the right. |
Returns
number
The result of rotating num to the right by bits positions as an unsigned 32-bit integer.