Shift
The shift microinstruction performs a bit-wise shift of the contents of the specified source register to either the left or the right and places the result in the destination register. The user specifies one of the following modes:
Logical shift - The newly emptied bits are given the value 0.
Arithmetic shift - If shifting right, then the leftmost bit is copied into the newly emptied bits. If shifting left, then the emptied bits on the right are given the value 0.
Cyclic shift - The bits dropped off one end are placed in the emptied bits on the other end.
Parameters:
Direction: either LEFT or RIGHT.
Distance: a non-negative integer indicating the number of bit locations to the left or right the values are to be shifted.
Source and Destination: the register whose contents are to be shifted and the register into which the shifted bits are placed. These two registers must have the same width and could be the same register.