Android Utililty Methods Bit Shift

List of utility methods to do Bit Shift

Description

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

Method

byte[]bitShiftLeft(byte[] data)
bit Shift Left
byte[] shifted = new byte[data.length];
int carry = 0;
for (int i = data.length - 1; i >= 0; i--) {
    int newCarry = getMostSignificantBit(data[i]);
    shifted[i] = (byte) (data[i] << 1);
    shifted[i] |= carry;
    carry = newCarry;
return shifted;