Revised reverse bit function