Download Print this page

Control Data Cyber 170 State Hardware Reference Manual page 101

Advertisement

CP Floating-Point Arithmetic Instructions
Floating Difference
3 l i j k
F l o a t i n g d i f f e r e n c e of (Xj) and
(Xk) t o X i
This i n s t r u c t i o n r e a d s operands from two X r e g i s t e r s , o p e r a t e s on them t o form
a f l o a t i n g - p o i n t d i f f e r e n c e , and d e l i v e r s t h i s r e s u l t t o a t h i r d X r e g i s t e r .
The operands f o r t h i s i n s t r u c t i o n a r e i n
X j
and
Xk.
These operands a r e i n
floating-point format and a r e not n e c e s s a r i l y normalized.
The r e s u l t of
s u b t r a c t i n g t h e q u a n t i t y i n X k from t h e q u a n t i t y i n
X j
i s delivered t o
X i i n
floating-point
format and i s not n e c e s s a r i l y normalized.
The two operands a r e unpacked from f l o a t i n g - p o i n t format, and t h e exponents are
compared.
The c o e f f i c i e n t with t h e smaller exponent
i s
r i g h t - s h i f t e d by t h e
d i f f e r e n c e of t h e
two
exponents such t h a t both c o e f f i c i e n t s a r e t h e
same
s i g n i f i c a n c e .
The Xk c o e f f i c i e n t i s then s u b t r a c t e d from t h e
X j
c o e f f i c i e n t t o
form a 96-bit r e s u l t .
The upper h a l f of t h e r e s u l t i s t h e n s e l e c t e d and packed
along with t h e l a r g e r exponent t o form t h e r e s u l t s e n t t o X i .
If
c o e f f i c i e n t
overflow occurs, t h e r e s u l t i s r i g h t - s h i f ted one p l a c e , and t h e exponent i s
increased by one.
I f t h e two operands have l i k e s i g n s , t h e r e s u l t c o e f f i c i e n t may have l e a d i n g
zeros.
N o normalize o p e r a t i o n
i s
b u i l t i n t o t h i s i n s t r u c t i o n t o c o r r e c t t h i s
s i t u a t i o n .
A
s e p a r a t e normalize i n s t r u c t i o n must be programmed i f t h e r e s u l t
i s t o be kept i n a normalized form.
I n f i n i t e (3777xxx...x
o r 4000xxx...x)
o r
i n d e f i n i t e (1777xxx...x
o r 6000xxx...x)
operands cause corresponding e x i t
conditions t o s e t i n t h e CP f o r e x i t mode a c t i o n .
For f u r t h e r information, r e f e r t o Floating-point Arithmetic under CP Programming
i n chapter 5.

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