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.
and