Subject: 1's Complement Arithmetic

From: "Wayne H. Warren Jr. 474-0814" <W3WHW at GIBBS.GSFC.NASA.GOV> (Code 681/GSFC)
Date: Wed, 16 Mar 94 21:52 EST

On 16 Mar at 15:47:54EST, dwells at NRAO.EDU(Don Wells) wrote:
> . . .   Mercifully, almost all of the 1-s complement machines have
>gone off to computer Valhalla.  FITS itself was carefully defined to
>use 2-s complement.

>I am intrigued by the fact that each number system has a number whose
>negation is arithmetically equal to itself. In the 1-s complement
>system the number is zero ((+0)==(-0) in C-speak), while in 2-s
>complement it is 32768 ((+32768)==(-32768)).

Not disagreeing with Don's statement, it certainly was convenient for
an observational astronomer working with declinations in sexigessimal
form that the 1's complement CDC machines distinguished between +0 and
-0 and one didn't need to treat the signs independently.  I can't
recount how many times I've seen errors in extinction coefficients and
other results because of the -0 bug in someone's program.

Wayne H. Warren Jr.
Hughes STX Corporation
Laboratory for Astronomy and Solar Physics
Code 681
NASA GSFC
Greenbelt  MD 20771-0001
(301)286-5419 (GSFC); (301)441-4086 (HSTX)
w3whw at gibbs.gsfc.nasa.gov