Seeing how I was invited and all, I will attempt to make it even a little clearer:
1 << KBD_MAX_ROW
is 1 << 4
<< means left shift the thing on the left by the number of bits on the right
(shift 1 to the left 4 times)
now look at rhino's binary example.
As for the other two, refer to bigmac's expansions then note that:
| means bitwise OR 00001010 | 00000011 = 00001011
& means bitwise AND 00001010 & 00000011 = 00000010
~ means one's complement (NOT) ~00001010 = 11110101
(values chosen are arbitrary)
Then read bigmac's beautifully concise one sentence explanation for their most common use.
Regards David
Message Edited by peg on 2006-07-29 09:29 AM