Optimized bit reversal methods.