马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <stdio.h>
typedef unsigned int uint;
int main(void)
{
uint i=123;
uint j=123<<16;
uint k=2570;
j+=k;
int a=0;
for (a=31;a>=0;a--)
{
if (a==15) putchar('\n');
printf("%d",(j&1<<a) != 0);//先位移后与;右到左;
}
putchar('\n');
printf("j = %d\n",j);
printf("i = %d\n",i);
printf("k = %d\n",k);
printf("j>>16 = %d\n",j>>16);
printf("j&65535 = %d\n",j&65535);
getchar();
return 0;
}
0000000001111011
0000101000001010
j = 8063498
i = 123
k = 2570
j>>16 = 123
j&65535 = 2570
--------------------------------
Process exited after 27.19 seconds with return value 0
请按任意键继续. . .
|