I think & operator is for both off and (on or off).
Nitesh said:
(Sat, Oct 15, 2011 05:51:33 PM)
ox01= 0*16^1+1*16^0=1
Now( num & ox01 (i.e.1))==will check whthr LSB is set or not
Similarly
ox02 ,ox04,ox08 will check 2ndbit,3rd bit and 4th bit
and then ox10=1*16^1+0*16^0=16
i.e 10000 hence it will check for 5th bit and so on...
like ox80= 8*16^1+0*16^0=128
i.e 1000 0000 it will check for 8th bit..