View Single Post
Old 07-07-2009, 02:57 AM   #53 (permalink)
Eriond
Crumbly, but Good
 
Eriond's Avatar
 
Join Date: May 2006
Location: Montreal
Posts: 1,645
Reputation: 67
Send a message via MSN to Eriond
Default

Well, if you do (1 || 0), it returns 1, because || denotes a boolean OR operation, meaning that if either of the inputs is one, it returns one. When you put the ! on the outside of the parentheses, you're essentially saying !1, which means NOT one. Which, in binary, is zero.
__________________
Outsider
3D Space Action Shooter/RPG in Development
http://www.youtube.com/user/outsidergame
Eriond is offline   Reply With Quote