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