However, for let's say n = 2, after the first line : 

tmp = 0000 0110 & 0x01 ; -> 0000 0000 
hence, the next line again check, 
if((<B>0000 0110</B> && 0000 0001) != 0)