uint32_t reverseBits(uint32_t n) { long ans=0; //从第一位算,计算完移位 for(int i=31;i>=0;i--){ if(n&1){ ans=ans+pow(2,i); } n=n>>1; } return ans; }