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)
|