TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CAMERON CLARK
from: JERRY COFFIN
date: 1997-08-02 14:13:00
subject: Signs of numbers

On (31 Jul 97) Cameron Clark wrote to Tom Torfs...
 CC>     I don't quite remember onez complement. Is the following true?
 CC>     0000 0001 bin  one as a positive char
 CC>     1111 1110 bin  toggle all bits
 CC>     1111 1111 bin  add one to make one as a negative char
 CC>     Or is that 2's complement.
That's two'c complement.  One's complement just toggles all the bits,
without the suceeding increment.
The question that arose was whether all bits being set to 1 (which is -0
in one's complement) can be considered a negative number or not.  Given
that the original assumption was that in 2's complement, the sign bit
could be used to decide betwen negative and positive numbers, it seemed
to me that erroneously classifying -0 as negative was roughly equivalent
to erroneously classifyin 0 as positive...
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.