Number Bases 687
shift(integer)
– or –
shift(integer,#ofShifts)
If #ofShifts is:
• omitted — bits shift once to the right
(default is
L1).
• negative — bits shift the specified number
of times to the right.
• positive — bits shift the specified number
of times to the left.
In a right shift, the rightmost bit is dropped
and 0 or 1 is inserted to match the leftmost
bit. In a left shift, the leftmost bit is dropped
and 0 is inserted as the rightmost bit.
Suppose you enter:
shift(0h7AC36)
Internally, the hexadecimal integer is
converted to a signed, 32-bit binary number.
Then the shift is applied to the binary number.
Function with syntax Description
If Base mode = HEX:
If Base mode = BIN: