Download Print this page

Control Data Cyber 170 State Hardware Reference Manual page 91

Advertisement

CP
Shift
Instructions
Left shift
( X k )
nominally (Bj)
places to Xi
rXi Bj,
Xk
This instruction reads a 60-bit operand from Xk, shifts the data either left or
right as specified by Bj, and writes the resulting 60-bit word into Xi.
If the
value in Bj is positive, the data is left-shifted circularly the number of bit
positions designated by the value in Bj.
If the value in Bj is negative, the
data is right-shifted with sign extension the number of bit positions
designated by the value in Bj.
Bj bit 17 determines the sign of Bj.
A
left-circular shift implies that the bit pattern in the 60-bit word is
displaced towards the highest-order bit positions. The bits shifted off the
upper end are inserted in the lowest-order bit positions in the same sequence.
The resulting 60-bit word has the same quantity of bits with values of 1 and
0
as in the original operand.
A
right shift with sign extension implies that the bit pattern in the 60-bit
word is displaced towards the lowest-order positions. The bits shifted off the
lower end are discarded. The highest-order bit positions are filled with
copies of the original sign bit.
Two sample computations are listed in octal notation to illustrate the
operation performed.
An example of a positive shift count resulting in a left-
circular shift is as follows:
An example of the right shift with sign extension is as follows:
If Bj bits 6 through
10
are different from Bj bit 17 aid Bj bit 17 is set, the
shift count is greater than 63 (decimal) places right, and a result of
+O
is
returned to Xi.
Bj bits 11 through 16 are not tested by this instruction.
This instruction is used when the amount of shift is derived in the
computation. The instruction is also used for correcting the coefficient of a
floating-point number when the exponent has been unpacked into a
B
register.

Advertisement

loading
Need help?

Need help?

Do you have a question about the Cyber 170 State and is the answer not in the manual?

Questions and answers