DSPRelated.com
Forums

For those of us with 16-bit integer machines

Started by Jerry Avins April 20, 2009
http://www.xkcd.com/571/

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Jerry Avins wrote:
> http://www.xkcd.com/571/ > > Jerry
No link to discussion of negative zero ???? ;/
On Mon, 20 Apr 2009 14:21:51 -0500, Richard Owlett
<rowlett@atlascomm.net> wrote:

>Jerry Avins wrote: >> http://www.xkcd.com/571/ >> >> Jerry > >No link to discussion of negative zero ???? ;/
There aren't that many one's complement machines around these days. ;) Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org Blog: http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php
Eric Jacobsen wrote:

> On Mon, 20 Apr 2009 14:21:51 -0500, Richard Owlett > <rowlett@atlascomm.net> wrote: > > >>Jerry Avins wrote: >> >>>http://www.xkcd.com/571/ >>> >>>Jerry >> >>No link to discussion of negative zero ???? ;/ > > > There aren't that many one's complement machines around these days. ;) > > Eric Jacobsen
It's just that Jerry and I lurk on a group having a long discussion about negative zero - something to do with floating point representations - just my sense of "humor" ;/
>On Mon, 20 Apr 2009 14:21:51 -0500, Richard Owlett ><rowlett@atlascomm.net> wrote: > >>Jerry Avins wrote: >>> http://www.xkcd.com/571/ >>> >>> Jerry >> >>No link to discussion of negative zero ???? ;/ > >There aren't that many one's complement machines around these days. ;)
Most floating point machines are ones complement. They have an exponent field, and usually some NAN logic too, but they are still ones complement. Steve
steveu <steveu@coppice.org> wrote:
 
> Most floating point machines are ones complement. They have an exponent > field, and usually some NAN logic too, but they are still ones complement.
No, most are sign magnitude. Some are twos complement. I don't know of any ones complement, but I suppose it is possible. The PDP-10 takes the twos complement of the whole word. -- glen
>steveu <steveu@coppice.org> wrote: > >> Most floating point machines are ones complement. They have an
exponent
>> field, and usually some NAN logic too, but they are still ones
complement.
> >No, most are sign magnitude. Some are twos complement. I don't >know of any ones complement, but I suppose it is possible.
Silly me. Of course they are. The effect is much the same though - two things mean zero.
> >The PDP-10 takes the twos complement of the whole word.
Regards, Steve
On Apr 21, 2:15&#4294967295;am, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> steveu <ste...@coppice.org> wrote: > > Most floating point machines are ones complement. They have an exponent > > field, and usually some NAN logic too, but they are still ones complement. > > No, most are sign magnitude. &#4294967295;Some are twos complement. &#4294967295;...
Glen, can you be more explicit about what you mean by a 2's comp float? i think i know what you mean, but if it is, i can't say so explicitly (because of where and how i first learned of it).
> I don't know of any ones complement, but I suppose it is possible. > > The PDP-10 takes the twos complement of the whole word.
so the PDP-10 had 2's comp floats? i never knew any computer with any wide distribution did. what was the bit field like? r b-j
On Apr 21, 10:29&#4294967295;am, robert bristow-johnson
<r...@audioimagination.com> wrote:
> On Apr 21, 2:15&#4294967295;am, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: > > > steveu <ste...@coppice.org> wrote: > > > Most floating point machines are ones complement. They have an exponent > > > field, and usually some NAN logic too, but they are still ones complement. > > > No, most are sign magnitude. &#4294967295;Some are twos complement. &#4294967295;... > > Glen, can you be more explicit about what you mean by a 2's comp > float? &#4294967295;i think i know what you mean, but if it is, i can't say so > explicitly (because of where and how i first learned of it). > > > I don't know of any ones complement, but I suppose it is possible. > > > The PDP-10 takes the twos complement of the whole word. > > so the PDP-10 had 2's comp floats? &#4294967295;i never knew any computer with any > wide distribution did. &#4294967295; what was the bit field like? >
don't bother, Glen. i just found out: http://www.inwap.com/pdp10/hbaker/pdp-10/Floating-Point.html i guess this is one of those obvious things that escaped my attention or creation, until i saw it used, and then i thought it was profoundly innovative. one stupid thing about IEEE-754 is that you can compare two floating- point numbers for ordering with the same logic as comparing two 2's comp integers *except* when they are both negative. then the comparison yields the opposite result. this 2's comp float (that maybe you see in the PDP-10) is sorta like companding and running your value through a piecewise-linear arcsinh() function. it is a strictly increasing one-to-one function that passes through zero gracefully (i'm assuming they have a "hidden 1" bit in the mantissa except for denorms, maybe the PDP-10 doesn't do that, but it should). r b-j
robert bristow-johnson <rbj@audioimagination.com> wrote:
(snip, I wrote)

>> No, most are sign magnitude. ?Some are twos complement. ?...
> Glen, can you be more explicit about what you mean by a 2's comp > float? i think i know what you mean, but if it is, i can't say so > explicitly (because of where and how i first learned of it).
For the PDP-10, a negative floating point value is generated with the same twos complement instruction as an integer. The format itself is the normal sign, exponent, significand form. Note that for a positive normalized floating point value, increasing floating point values, if you consider the bit pattern as an integer, also have an increasing value. (I am not sure about denormal, but the PDP-10 didn't have them.) A PDP-10 negative floating point value is the twos complement of the whole word. It would seem that might involve a carry between the significand and exponent, but that won't happen for a normalized non-zero value. (There is no hidden-one.) The results of some instructions are undefined for non-normalized values. The result of using this format is that fixed point compare instructions are used also for floating point values. -- glen