Reverse order of bits in encode