Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有简单的方法来解决这个问题?7 位二进制补码可以表示的最小(最负)数是多少?展示如何将数字转换为其二进制补码表示。
最小的数字是-2^6。要在 2 的补码(也就是它的绝对值)中找到负数的倒数,翻转位并加一。所以(-1)*1000001 = 0111110+1 = 0111111 = 1000000 - 1 = 2^6-1。正如你所看到的,有一个数字比1000001它小,它比它小一:1000000. 找到它的绝对值,我们得到:
-2^6
(-1)*1000001 = 0111110+1 = 0111111 = 1000000 - 1 = 2^6-1
1000001
1000000
(-1)*(100000) = (-1)*(100001-1) = (-1)*(100001) + 1 = (2^6-1)+1 = 2^6.
(-1)*(100000) = (-1)*(100001-1) = (-1)*(100001) + 1 = (2^6-1)+1 = 2^6