Purpose
Performs a logical shift.
Argument type and attributes
- I
- must be of type integer.
- SHIFT
- must be of type integer. The absolute value of SHIFT must be less
than or equal to BIT_SIZE (I).
Result type and attributes
Same as I.
Result value
- The result has the value obtained by shifting the bits of I by
SHIFT positions.
- If SHIFT is positive, the shift is to the left; if SHIFT is negative,
the shift is to the right; and, if SHIFT is zero, no shift is performed.
- Bits shifted out from the left or from the right, as appropriate,
are lost.
- Vacated bits are filled with zeros.
- The bits are numbered 0 to BIT_SIZE(I)-1, from right to left.
Specific Name |
Argument Type |
Result Type |
Pass As Arg? |
ISHFT 1 |
any integer |
same as argument |
yes |
|