AW: Converting to and from FAC

From: Spiro Trikaliotis (Spiro.Trikaliotis_at_gmx.de)
Date: 2000-10-19 07:56:44

I'll comment on this...

> Take the number -0.5 (your example)
> is negative, therefore sign bit is 1
> as binary 0.101?
> shift LEFT by 1, exponent = -1 +128 = $80
> mantissa = ?

-0.5 goes into two parts: Sign and "Value".

Sign is negative, therefore a "1".

The Value is:

0.5 (base 10) = 0.1 = 1.0 * 2^^1

So, the "fractional part" is 1.00000...0

Now, we replace the part before the decimal point (the 1) with the sign
(again a 1). Leaving out the decimal point, we have the value we have to
store as mantisse, e.g., 1000...0, so the mantisse is 80 00 00 00 (hex).

HTH,
   Spiro.

-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tml.hut.fi.

Archive generated by hypermail 2.1.1.