若X=-107,Y=+74,按8位二进制可写出:[X]补=(),[Y]补=(), [X+Y]补=(),[X-Y]补=()
正确答案:
[X]补=10010101,[Y]补=01001010,[-Y]补=10110110 按补码运算规则:
[X+Y]补=[X]补+[Y]补=01001010+10110110=11011111
[X-Y]补=[X]补+[-Y]补
=10010101+10110110=101001011 =4BH,结果溢出。
[X+Y]补=[X]补+[Y]补=01001010+10110110=11011111
[X-Y]补=[X]补+[-Y]补
=10010101+10110110=101001011 =4BH,结果溢出。
答案解析:有

微信扫一扫手机做题