![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
内存
Tracy_Jia178
程序妞~
展开
-
对给定值进行操作
题目: Write a C expression that will yield a word consisting of the least significant byte of x, and the remaining bytes of y. For operands x = 0x89ABCDEF and y = 0x76543210, this would give 0x765432E原创 2017-05-01 22:16:30 · 444 阅读 · 0 评论 -
操作系统信息存储与表示
低位存放在高地址,高位存放在低地址。原创 2017-05-01 15:32:31 · 391 阅读 · 0 评论 -
C语言位运算
/* Get most significant byte from x */int get_msb(int x) {/* Shift by w-8 */int shift_val = (sizeof(int)-1)<<3;/* Arithmetic shift */int xright = x >> shift_val;/* Zero all but LSB */return xrig原创 2017-05-02 15:06:41 · 283 阅读 · 0 评论 -
位运算
#include #include #include /*如果 x 所有位都为 1 ,返回 1 ,否则,返回 0 */bool x_equals_1(int x) { return !(~x);}/*如果 x 所有位都为 0 ,返回 1 ,否则,返回 0 */bool x_equals_0(int x) { return !x;}/*如果 x 的最低原创 2017-05-02 20:52:45 · 328 阅读 · 0 评论