question

• 10-02-2004
NiVaG
question
why is 11111111+1 + to -1?
• 10-02-2004
bithub
Is there a typo in that question? I dont understand what you are asking.
• 10-02-2004
Vicious
You mean binary or decimal or what...

If binary then all I can figure is that when the left most bit of a signed variable is 1 that means its negitive. Thats why and unsigned char can hold 0-255 and a signed char like -127 to 127 ( er something like that )
• 10-02-2004
Prelude
>why is 11111111+1 + to -1?
Whether this is true depends on what universe you're from. Would you care to be more specific please?
• 10-02-2004
vasanth
well i think he is using some old 16 bit dos compilers... when he does 11111111+1 the limit of the variable is reached and the bit pattern is read as -1.....
• 10-02-2004
aldajlo
i agree with vicious

this is binary arithmetic as i suppose
it is like this

11111111 + 1 = 100000001

since in binary most significant bit represents a sign
it gets set to 1 and read as
1------------->for sign ---->i.e.-ve