CEESISHF—Bit shift

Purpose

CEESISHF returns a copy of its parm1 input right- or left-shifted by the number of bits indicated by parm2.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-CEESISHF--(--parm1--,--parm2--,--fc--,--result--)-----------><

parm1 (input)
The first input to the Bit Shift routine. The input can be any 32-bit integer.
parm2 (input)
The second input to the Bit Shift routine. The parm2 value is a 32-bit integer in the range between -32 and 32, inclusive.
fc (output)
A 12-byte feedback code, optional in some languages, that indicates the result of this service. If you choose to omit this parameter, refer to Invoking callable services for the appropriate syntax to indicate that the feedback code was omitted.

The following symbolic conditions can result from this service:

Code Severity Message number Message text
CEE000 0   The service completed successfully.
CEE1VC 2 2028 The value of the second argument was outside the valid range range in math routine routine-name.
result (output)
The result of the Bit Shift routine. The output is a 32-bit integer whose value depends upon the value of parm2; in either case, vacated bits are set to 0:
  • If parm2 is greater than or equal to 0, result is a copy of parm1 shifted left by parm2 bits.
  • If parm2 is less than 0, result is a copy of parm1 shifted right by |parm2| bits.