Part 2 of 2 Two‘s complement

Part 2 of 2 Two‘s complement

Part 2 of 2 Two‘s complement

学号16340090
int8_t x = -0x1f = 10011111
int y = x = 159
因为x=−16−15=−31=(10011111)2 补码为(11100001)2转化为十六进制为(1b1)16
所以y=128+16+8+4+2+1=159转化为十六进制为(09f)16

猜你喜欢

转载自blog.csdn.net/ddghsot/article/details/52704705
今日推荐