@technobuddha > library > Binary > Arithmetic
Function: rotl()
ts
function rotl(num: number, bits: number): number;Defined in: rotl.ts:10
Rotates the bits of a 32-bit number to the left 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 left. |
Returns
number
The result of rotating num to the left by bits positions as an unsigned 32-bit integer.