Android Utililty Methods Bit Get

List of utility methods to do Bit Get

Description

The list of methods to do Bit Get are organized into topic(s).

Method

intgetBit(byte[] bytes, int bitNr)
Get the given bit in the encoded bytes.
int byteNr = bytes.length - (bitNr / 8) - 1;
int bitNrInByte = bitNr % 8;
return bytes[byteNr] >>> bitNrInByte & 1;
intgetMostSignificantBit(byte b)
get Most Significant Bit
return b >> 7 & 0x1;