
PROGRAMMING CONCEPTS II 131
3.6 | Shift and Rotate Instructions
Table 3.8 gives the complete list of the shift and rotate instructions.
3.6.1 | Shift
Shift instructions do arithmetic or logical shifting.i)
ey also shift right or left.ii)
Arithmetic shift is used for signed number operations, while logical shift caters to unsigned iii)
numbers.
Shifting right causes a divide by 2, for each bit position shifted, while shifting left corresponds iv)
to a multiplication by 2.
e count means the number of bit positions, by which shifting is to be done.v)
If the count vi) >1, load it in CL, otherwise use ‘1’ in the immediate mode.
SAL/SHL – Shif ...