为什么字节地址在下面的例子中只存储 2 位数字?
why the byte address stores only 2 digits in below example?
int x = 0x76543210;
char *c = (char*) &x;
Big endian format:
------------------
Byte address | 0x01 | 0x02 | 0x03 | 0x04 |
+++++++++++++++++++++++++++++
Byte content | 0x76 | 0x54 | 0x32 | 0x10 |
为什么字节地址ox01只存储了0x76而不是0x765?
一个字节是 8 位,十六进制从 0x00 --> 0xFF (0 -> 255)。
0x765 - 这是十六进制 - 不可能适合 8 位。
int x = 0x76543210;
char *c = (char*) &x;
Big endian format:
------------------
Byte address | 0x01 | 0x02 | 0x03 | 0x04 |
+++++++++++++++++++++++++++++
Byte content | 0x76 | 0x54 | 0x32 | 0x10 |
为什么字节地址ox01只存储了0x76而不是0x765?
一个字节是 8 位,十六进制从 0x00 --> 0xFF (0 -> 255)。
0x765 - 这是十六进制 - 不可能适合 8 位。