Rotate
- Updated2023-02-17
- 2 minute(s) read
Rotate
Rotates the specified input (x) the number of specified bits (y).

Inputs/Outputs

y
The number of bits to rotate x by.
If y is greater than 0, the node rotates x left y bits in the positive direction (from least significant to most significant bit) and inserts the high-order bits in the low-order bits. If y is less than 0, the node rotates x right y bits (from most significant to least significant bit) and inserts the low-order bits in the high-order bits.

x
An input to this operation.
If x is an 8-, 16-, 32-, or 64-bit integer, then for any value of y, y ± 8, y ± 16, y ± 32, or y ± 64 yields the same output value, respectively, as y.
For example, if x is an 8-bit integer, y = 1 and y = 9 yield the same result.

x rotated left by y
The result of the rotation.