Integer to Floating-Point Conversion (FLOAT Instruction)
5-43
Data Formats and Floating-Point Operation
5.10 Integer to Floating-Point Conversion (FLOAT Instruction)
Integer to floating-point conversion, using the FLOAT instruction, allows
single-precision integers to be converted to extended-precision floating-point
numbers. The flowchart for this conversion is shown in Figure 5–21.
Figure 5–21. Flowchart for Integer to Floating-Point Conversion by FLOAT Instruction
Test for special cases of
c (man)
c (exp) = –128
c (man) = 0
Leading nonsignificant
sign bits
Set
c to final result
c = float (
α
)
c (man) = c (man) < < k
c (exp) = 30 – k
k = # leading
nonsignificant
sign bits
α
Remove most significant nonsign bit
c (man) =
α
c (exp) = 30