Rotates specified bits within an integer.
lispworks
rotate-byte count bytespec integer => result-integer
count⇩ |
An integer. |
bytespec⇩ |
A byte specifier. |
integer⇩ |
An integer. |
result-integer |
An integer. |
The function rotate-byte
returns integer with the bits specified by bytespec rotated left by count bits. Other bits remain the same as in integer. If count is negative, then the effect is to rotate right.
(rotate-byte 2 (byte 3 1) 99) => 105 (rotate-byte -2 (byte 3 1) 99) => 101
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:41