SHIFTLEFT


 

The SHIFTLEFT instruction performs a left logical shift of variable's bits. It uses the following format:

 

 

[label]

SHIFTLEFT

{source},{count}

 

Where:

label

Optional. A Program Execution Label.

source

Required. An Integer variable that is modified.

count

Required. A number of bits to shift.

Flags Affected: ZERO

Note the following:

  1. The SHIFTLEFT instruction performs a left logical shift of the {source] variable bits by the {count} bit count value.

  2. High order bits that are shifted beyond the size of the {source} variable are truncated and lost. Lower order bits that are shifted left are replaced with a bit value of zero.

  3. The SHIFTLEFT and SHIFTLEFTA instructions always give the same results.

  4. The ZERO flag is set if the resulting {source} variable value is zero.

 

 

See Also: SHIFTLEFTA, SHIFTRIGHT, SHIFTRIGHTA, ROTATERIGHT, ROTATELEFT, Mathematical Instructions

 



PL/B Language Reference ROTATERIGHT SHIFTLEFTA