Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Well...False is 00000000 so true must be 11111111=-1 in decimal system(255 unsigned)
In all of the other programming languages I know
(not many) true is equal to -1 which makes more sense...
how can NOT(FALSE) be something else than NOT(00000000) ?
Thank you !!
Posted
Comments
Maciej Los 6-May-14 14:53pm    
Sample code would be appreciated.
Richard MacCutchan 6-May-14 15:14pm    
Because.

To clarify: FALSE is defined as zero, and TRUE is defined as not zero, or in other words any non-zero value, or expression.
[no name] 6-May-14 15:14pm    
Can you cite any reference to any programming language documentation where -1 evaluates to true?

 
Share this answer
 
Wikipedia:
The comparison operators ('>', '==', etc.) are defined to return a signed integer (int) result, either zero (for false) or 1 (for true)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900