我对其中一些操作(组合按位和逻辑操作)感到困惑。
如果 x = 0x3F 和 y = 0x75,求 diff c 表达式的字节值:
1) x&y
2) x | y
3) ~x | ~y
4) x & ~y
5) x && y
6) x || y
7) !x || !y
8) x && ~y
试图
首先,我将十六进制转换为二进制:
x = 00111111
y = 01110101
这是我的尝试
1) 00110101
2) 01111111
3) 01111111
4) x & not y? isn't the bang operator a logical operator? what is the bit representation of !y?
5) x && y = TRUE = but how is that represented as a byte? 11111111?
6) x || y = how can this be represented as a byte?
7) !x || y = ???
8) x && ~y = ?????