Made bit reversal alg handle any size of bits

Basically I had to adjust the length of the bits to a power
of two then shift the final number by the difference of the
adjusted bit length and the original bit length.