举例说明: 计算 126d + 63d
x =126d =111 1110b, y =63d =11 1111b
约定字长9位,用变形补码表示,尾数7位:
x补 =00 111 1110b
y补 =00 011 1111b (+
-------------------------------
[x+y]补 = 01 011 1101b
双负号位为01, 正向溢出
x+y =1 011 1101b =189d
举例说明: 计算 126d + 63d
x =126d =111 1110b, y =63d =11 1111b
约定字长9位,用变形补码表示,尾数7位:
x补 =00 111 1110b
y补 =00 011 1111b (+
-------------------------------
[x+y]补 = 01 011 1101b
双负号位为01, 正向溢出
x+y =1 011 1101b =189d