CP Shift Instructions
CP
Shift lnstructions
The s h i f t i n s t r u c t i o n s ( t a b l e 4-41 s h i f t t h e
X i
60-bit word through t h e number
of b i t p o s i t i o n s determined from a computed s h i f t count.
Table 4-4.
CP S h i f t I n s t r u c t i o n s
Opcode
Format
I n s t r u c t i o n
Mnemonic
20
i j k
L e f t s h i f t ( x i ) by
jk
LXi jk
22
i jk
L e f t s h i f t
(Xk)
nominally (Bj) p l a c e s t o
X i
LXi Bj Xk
2 1
i
j k
Right s h i f t ( X i ) by jk
AX1 jk
23
i j k
Right s h i f t
(Xk)
nominally ( B j ) p l a c e s t o X i
A X i Bj Xk
Left Shift
2 0 i j k
L e f t s h i f t (Xi) by jk
LXi jk
This i n s t r u c t i o n r e a d s one operand from X i , s h i f t s t h e 60-bit word l e f t
c i r c u l a r l y by
jk
b i t p o s i t i o n s , and w r i t e s t h e r e s u l t i n g 60-bit word back i n t o
t h e same
X i
r e g i s t e r .
The j and
k
d e s i g n a t o r s a r e t r e a t e d a s a s i n g l e 6-bit
p o s i t i v e i n t e g e r operand i n t h i s i n s t r u c t i o n .
A
l e f t - c i r c u l a r
s h i f t i m p l i e s t h a t t h e b i t p a t t e r n i n t h e 60-bit word i s
d i s p l a c e d towards t h e h i g h e s t - o r d e r b i t p o s i t i o n s .
The b i t s s h i f t e d o f f t h e
upper end of t h e 60-bit word a r e i n s e r t e d i n t h e lowest-order b i t p o s i t i o n s i n
t h e same sequence.
The r e s u l t i n g 60-bit word h a s t h e same q u a n t i t y of b i t s
w i t h v a l u e s of 1 and
0
a s i n the o r i g i n a l operand.
A sample computation
i s
l i s t e d i n o c t a l n o t a t i o n t o i l l u s t r a t e t h e o p e r a t i o n
performed.
I n i t i a l I X i )
=
2323 6600 0000 0000 0111
jk
=
I2
( o c t a l )
F i n a l (Xi)
=
7540 0000 0000 0022 2464
This i n s t r u c t i o n , t o g e t h e r w i t h i n s t r u c t i o n 21, may be used whenever a d a t a
word i s t o be s h i f t e d by a predetermined amount.
I f t h e amount of s h i f t i s
d e r i v e d i n t h e e x e c u t i o n of t h e program, use i n s t r u c t i o n 22 o r 23.
Need help?
Do you have a question about the Cyber 170 State and is the answer not in the manual?
Questions and answers