我知道如果最高位有进位,r 基数的 r-1 补码应该在进位附近结束。
但我不知道为什么它应该这样做。
我只能想它的原因可能是关于零的两个表示。
前任:
1 1 1 0 (-1)
0 1 0 1 (+5)
===============
10 0 1 1 =====>(0 1 0 0)
I just can explain it from the result that because its sum is positive, and 1's complement has two representations, so it should add one.
前任:
1 1 1 0 (-1)
1 0 1 0 (-5)
===============
11 0 1 1 =====>(1 0 0 1)
And I cannot explain it why should add one.
结束随身携带的真正原因是什么?
谢谢你阅读它。