static bool checkBitPositionIsSet(int number, int bitPosition) { if ((number & (1 << (bitPosition - 1))) > 0) { return true; } else { return false; } }