Arbitrarily Shift Bit Array Represented As Array of 32-bit Integers
Java 306

public static int[] shiftBitArray(int[] bits, int shift) {
    BigInteger r = BigInteger.ZERO;
    for (int i = bits.length - 1; i &gt;= 0;) r = BigInteger.valueOf(0xffffffffL &amp; bits[i--]).or(r.shiftLeft(32));
    r = r.shiftLeft(shift);
    int[] a = new int[(int) Math.ceil(r.bitLength() / 32d)];
    for (int i = 0; i &lt; a.length; r = r.shiftRight(32)) a[i++] = r.intValue();
    return a;
}