* HELP: PDP 11/24 floating point format ?
@ 1996-06-10 4:00 Rene Chave
1996-06-11 4:00 ` fairfield
0 siblings, 1 reply; 2+ messages in thread
From: Rene Chave @ 1996-06-10 4:00 UTC (permalink / raw)
I am looking for the floating point format on PDP 11/24. We have some old
data in this format that I need to translate but I do not have the PDP
11/24 hardware manual to look up the format. If anyone can help I would
very much appreciate it.
Thanks in advance.
--
Rene Chave
ASL Environmental Sciences Inc.
1986 Mills Rd.
Sidney B.C.
V8L 5Y3
Voice: (604) 656-0177
Fax: (604) 656-2162
Email: chave@islandnet.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: HELP: PDP 11/24 floating point format ?
1996-06-10 4:00 HELP: PDP 11/24 floating point format ? Rene Chave
@ 1996-06-11 4:00 ` fairfield
0 siblings, 0 replies; 2+ messages in thread
From: fairfield @ 1996-06-11 4:00 UTC (permalink / raw)
In article <4pi94a$ad4@sanjuan.islandnet.com>,
Rene Chave <chave@islandnet.com> writes:
>
> I am looking for the floating point format on PDP 11/24. We have some old
> data in this format that I need to translate but I do not have the PDP
> 11/24 hardware manual to look up the format. If anyone can help I would
> very much appreciate it.
Going out on a limb here, especially given the large number of
"11" afficionados out there, but isn't the VAX F_float the same as
the PDP-11 representation because of the 11/780 compatibility mode?
That's what I'd always been told. The VAX representation looks like
this:
===============================================================================
C.5.1 REAL*4 (F_floating)
"REAL*(4 (F_floating) data is four contiguous bytes starting on
an arbitrary byte boundary. Bits are labeled from the right, 0
through 31.
15 14 7 6 0
+-+--------------------+----------+
|S| | |
|I| E X P O N E N T | FRACTION | :A
|G| | |
|N| | |
+-+--------------------+----------+
| |
| F R A C T I O N | :A+2
| |
| |
+---------------------------------+
31 16
SIGN = 0(+), 1(-)
The form of REAL*4 (F_floating) data is sign magnitude, with bit
15 the sign bit, bits 14:7 an excess 128 binary exponent, and
bits 6:0 and 31:16 a normalized 24-bit fraction with the
redundant most significant fraction bit not represented. The
value of F_floating data is in the approximate range: 0.29*10**-38
through 1.7*10**38. The precision is approximately one part in 2**23,
that is, typically, seven decimal digits."
===============================================================================
Note that the exponent is biased by 128 (not 127 like IEEE
Single) and that the _normalization_ is such that the mantissa, M,
is in the range 1.0 <= M < 2.0 (not like IEEE which is 0.5 <= M <
1.0). The result is that if you rearrange the two 16-bits words so
that the least significant mantissa word (which is at a higher
address) is in the least significant 16-bits of a 32-bit float/REAL,
and the word containing the sign, exponent, and most significant
mantissa (at the lower address) is in the most significant 16-bits
of the 32-bit float/REAL, the format is identical to IEEE Single.
However, the _value_ needs to be reduced by a multiplicative factor
of _4_ if interpreted as IEEE due to the difference in normalization
and exponent bias.
Be aware that 11's are little-endian machines, so if you're
reading this data on a big-endian machine, you'll need to swap bytes
before rearranging words.
-Ken
--
Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
SLAC, P.O.Box 4349, MS 46 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
Stanford, CA 94309 | Voice: 415-926-2924 FAX: 415-926-3515
-------------------------------------------------------------------------
These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-06-11 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-06-10 4:00 HELP: PDP 11/24 floating point format ? Rene Chave
1996-06-11 4:00 ` fairfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox