Quote:
|
Originally Posted by jacobhurwitz
So p3_aux&1<<7 says, "is the seventh bit from the right true?"
|
In this case
p3_aux&1<<7 -- or to my careful mind
p3_aux&(1<<7) -- is a roundabout way of saying
p3_aux&0x80 , the 0x80 simplifying the 1<<7?
This is why I hesitated when I wrote it with the parentheses. I wasn't sure of precedence in the first place, and after I typed it both ways I realized that what you're doing (1<<7 first, then the &) could be what was intended. Which is why using extra parentheses, even if not legally necessary makes sure you're writing what you indend and others understand!