#include <stdio.h>
#include <stdlib.h>
int main(){
int a = 0x87654321;
int b,d,c,e;
b = a & 0xFF; // 0x00000021
c = ~ 0xFF;
d = a ^ c; // 0x789abc21
e = a | 0xFF; // 0x876543ff
printf("%.8x,%.8x,%.8x,%.8x\n",b,c,d,e);
return EXIT_SUCCESS;
}
【C语言】位的运算(深入理解计算机系统第三版习题2.12)
最新推荐文章于 2023-01-08 21:21:00 发布