The ISHFT function performs the bit shift operation on bytes, integers and longwords. If P 2 is positive, P 1 is left shifted P 2 bit positions with 0 bits filling vacated positions. If P 2 is negative, P 1 is right shifted with 0 bits filling vacated positions.

Calling Sequence

Result = ISHFT( P 1 , P 2 )


P 1

The scalar or array to be shifted.

P 2

The scalar or array containing the number of bit positions and direction of the shift.


Bit shift each element of the integer array [1, 2, 3, 4, 5] three bits to the left and store the result in B by entering:

B = ISHFT([1,2,3,4,5], 3)

The resulting array B is [8, 16, 24, 32, 40].

See Also