NonStop S-Series Server Description Manual (G06.24+)

TNS Instruction Set
HP NonStop S-Series Server Description Manual520331-003
11-5
Immediate Operand and Shift Instructions
Figure 11-4 presents a comparison of logical (unsigned) shifts and arithmetic (signed)
shifts. In arithmetic left shifts, the sign bit is unaffected (except in accelerated mode);
in logical left shifts, the sign bit participates in the shift. In arithmetic right shifts, the
sign bit is propagated to the right; in logical right shifts, vacated positions are filled with
zeros.
Figure 11-4. Examples of Logical and Arithmetic Shifts
Left Shifts
ALS 3 (Arithmetic left shift three positions)
0101 1 01 000111 001Operand in A:
% 056071
0110 0 00 111001 000Result in A: % 060710
State of sign bit
is preserved
LLS 3 (Logical left shift three positions)
0101 1 01 000111 001Operand in A:
% 056071
1110 0 00 111001 000Result in A: % 160710
0
0
Right Shifts
ARS 7 (Arithmetic right shift seven positions)
1111 0 10 110000 001Operand in A: % 171601
1111 1 11 111100 111Result in A:
% 177747
Sign bit is propagated
seven positions
LRS 7 (Logical right shift seven positions)
1111 0 10 110000 001Operand in A:
% 171601
% 000747
0000 0 00 111100 111Result in A:
0
VST322.vsd