TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: TOM TORFS
from: CAMERON CLARK
date: 1997-07-31 16:28:00
subject: Re: Signs of numbers

EW> Yes, but AFAIK not all numbers with the high bit set are negative
EW> numbers. 1's would be '-0', just as all 0's would be '+0'.
TT> 
TT>  CC>     All ones is -1  (0xff...)
TT>  CC>     All zeros is 0  (0x00...)
TT> 
TT> He was talking about 1-complement systems, and thus about the portability
TT> problem of the high-bit check for a negative value.
    I don't quite remember onez complement. Is the following true?
    0000 0001 bin  one as a positive char
    1111 1110 bin  toggle all bits
    1111 1111 bin  add one to make one as a negative char
    Or is that 2's complement.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)

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™.