What method would you use to determine if the the bit that represents 2^x is a 1 or 0 ?
For the nth LSB (least significant bit), the following should work:
n
boolean isSet = (value & (1 << n)) != 0;