List of utility methods to do Bit Mask
int | bitMask(final int numberOfBits) Returns a bit mask for the specified number of bits. if (numberOfBits >= 32) { return -1; return (numberOfBits == 0 ? 0 : powerOf(2, numberOfBits) - 1); |
int | bitMask(int bit) Calculate a bitmask of the bit. assert bit >= 0 && bit < 16; return 1 << bit; |
int | bitMask(int bitSize) bit Mask return (0xFFFFFFFF >>> (SZ_INT - bitSize));
|
byte | bitMask(int i) bit Mask return (byte) (1 << i); |