​题目​

很简单的位运算题目

class Solution {
public:
uint32_t reverseBits(uint32_t n) {

uint32_t ans;

int pos = 0;
while(pos<=31)
{
ans <<= 1;
ans |= (n&1);
n >>=1;
pos++;
}

return ans;

}
};