What method would you use to determine if the the bit that represents 2^x is a 1 or 0 ?
Eliminate the bitshifting and its intricacies and use a LUT for the right and
operand.
declare a temp int and make it equal the original. then shift temp >> x times, so that the bit you want to check is at the last position. then do temp & 0xf to drop the preceding bits. Now left with last bit. Finally do if (y & 1 == 0), if last bit is a 1, that should equal 0, else will equal 1. Its either that or if (y+0x1 == 0)... not too sure. fool around and see