#include<stdio.h>
int main()
{
int a=0; 0000 0000 0000 0000 0000 0000 0000 0000
int b=~a; //~按位取反 1111 1111 1111 1111 1111 1111 1111 1111,补码-1,1111 1111 1111 1111 1111 1111 1111 1110,反码求反 1000 0000 0000 0000 0000 0001原码为-1
printf("%d\n",b); // -1
return 0;
}
06-17
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交