Click here to Skip to main content
13,347,124 members (60,360 online)
Rate this:
 
Please Sign up or sign in to vote.
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 6-May-14 9:32am
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.
Wes Aday 6-May-14 15:14pm
   
Can you cite any reference to any programming language documentation where -1 evaluates to true?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 6 May 2014
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100