内存中有符号短路的值(字节顺序)

时间:2018-03-24 11:16:13

标签: c memory int unsigned signed

所以我明白了:

  adress |   a   |  a+1  |  a+2  |  a+3
  bytes  |  0x80 | 0x00  | 0x00  | 0x01

我需要知道在哪个数字中表示:

  • Little endian,unsigned int(16777344 to me)
  • Big endian,unsigned int(2147483649 to me)
  • Little endian,int(对我而言仍然是16777344)
  • Big endian,int(-2147483647因为Two的补码,即!number + 1)

  • -Big endian,short( - (2 ** 15 +1)to me)

  • -Little endian,short(128 to me)

  • -Big endian,unsigned short(32768 to me)

  • -Little endian,unsigned short(128 to me)

我犯了什么错吗?

0 个答案:

没有答案