Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
If your conditional is actually doing a bitwise-xor (^ operator) using & vs && or | vs || can make a difference because of precedence.

Precedence could also cause an issue if you combined bitwise and logical operators in the same conditional.
 
If your conditional is actually doing a bitwise-xor (^ operator) using & vs && or | vs || can make a difference because of precedence.

Precedence could also cause an issue if you combined bitwise and logical operators in the same conditional.

Which is the thing that perplexed me about bitwise operators. They are funamentally mathematical and so should have a higher priority than comparators. My instinct is to see A & B == C as equivalent to its sequntial order (left to right) when the opposite is the case. I had been anal about controlling the ordering of all my expressions with parens, then after being bitten by that foolish assumption, now that habit has become even more extreme.
 
^^^

I'd start deperplexifying by looking into the history of C, particularly its predecessor languages B and BCPL. If I had to guess, it would be that & and | predated && and ||, so the precedence made some kind of sense given what existed at the time, and it was never changed for hysterical raisins.
http://en.wikipedia.org/wiki/Hysterical_raisins
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.