#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
unsigned int reverse(unsigned int a)
{
unsigned int flag = 0x1;
unsigned int ret = 0;
int i = 0;
while (i < 32){
if (a&(flag << i)){ //检测a的比特位
ret |=(flag << (32 - i - 1));
}
i++;
}
return ret;
}
int main(){
unsigned int a = 1234;
unsigned int b = reverse(a);
printf("%u ", b);
system("pause");
return 0;
}