Port-vax archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Thoughts about IEEE floating point (-ish) on vax
> Hi Mouse!
Heya!
>>> * Vax hidden bit is 0.5, IEEE is 1.
>> I'm not entirely sure what you mean here. By the value of the
>> hidden bit, you mean that [if] the mantissa bits are mmmm, the value
>> is .1mmmm * 2^eee versus 1.mmmm * 2^eee?
(The above is in binary, and I was careless: the eee is the *unbiased*
exponent, not the exponent bits from the bit-pattern.)
> Now I'm not getting what you mean :-)
> I try to rephrase:
> vax: With an (unbiased) exponent of zero and only the hidden bit set
> the decimal value is 0.5.
> ieee: With an (unbiased) exponent of zero and only the hidden bit set
> the decimal value is 1.0.
Yes, this is exactly what I meant.
But, in terms of the mapping between bit-patterns and numerical values,
this is completely equivalent to thinking of the VAX and IEEE as using
the same hidden bit value but using the exponent biases that differ by
one, because 0.1mmmm * 2^E equals 1.mmmm * 2^(E-1) (where the manissa
is in binary, of course). The only difference is in the mental model.
It might be slightly less confusing to describe it as a question of
whether the binary point is to the left or right of the hidden bit.
> Then the bias is different as well.
I'd say the bias is different by one - IF you think of the hidden bit
value as being the same for both representations; looking at the
bit-patterns for 1.0 makes that clear. If you think of the hidden bit
values as different, as you describe, the exponent biases either are
equal or differ by two. I think they'd be equal, because
>> After bit rearrangement, 1 is biased exponent 7f for IEEE (printing
>> as 3f8 because the sign bit shifts it over by one) and 80 for VAX
>> (400, ditto).
You can think of this as a bias difference of 1 with the binary point
in the same place, or equal biases with the binary point to the left of
the hidden bit for the VAX but to the right for IEEE - but not both.
This corresponds to writing 1 as, depending on which representation and
which bias value,
0b1.0 * 2^(127-127)
IEEE, binary point to the right of the hidden bit and a bias of
127.
0b0.1 * 2^(127-126)
IEEE, binary point to the left of the hidden bit and a bias of
126.
0b1.0 * 2^(128-128)
VAX, binary point to the right of the hidden bit and a bias of
128.
0b0.1 * 2^(128-127)
VAX, binary point to the left of the hidden bit and a bias of
127.
The only difference between the two ways of thinking of IEEE, or
between the two ways of thinking of VAX, is in the mental model; you
end up with the same values regardless. (You could get a bias
difference of two, but only by putting the binary point to the left of
the hidden bit for IEEE and to the right for VAX, which is backwards
compared to what you described.)
The VARM makes it clear DEC thought of the exponent bias as 128, in
which case the hidden bit has to have value 1 (the binary point is to
the right of it), since it speaks of "excess 128 binary exponent" and
says that exponent-field values 1 through 255 correspond to true binary
exponents -127 through 127. That does not by itself say where the
binary point is, since "normalized 24-bit fraction" is ambiguous
(normalized to [.5,1) normalized to [1,2) - or to something else?).
But the observed bit patterns make it clear.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index