Assembly 过量N到2的补码

Assembly 过量N到2的补码,assembly,binary,intel,twos-complement,Assembly,Binary,Intel,Twos Complement,有人能解释一下怎么做吗?这不是家庭作业 有人能告诉我怎么做吗 Show that if N is chosen to be equal to 2^(m-1) where m is the number of bits in the representation, then an Excess N representation will be the same as a 2's Complement representation but with the sign bit inverted. Hi

有人能解释一下怎么做吗?这不是家庭作业

有人能告诉我怎么做吗

Show that if N is chosen to be equal to 2^(m-1) where m is the number of bits
in the representation, then an Excess N representation will be the same as a 2's
Complement representation but with the sign bit inverted. Hint - transform the
summation formula for Excess-N numbers to the summation formula for 2's Comp
numbers.

首先,我如何将多余N个数的求和公式转换为2个补数的求和公式?其次,我应该如何确切地证明这一点呢?

计算机中的数字存储为m位,这些位保存的数字范围为[0..2^m-1]-正无符号数。所以为了表示负数,你需要以某种方式将负数编码到这个空间中。有很多种方法可以做到这一点,符号量、两个补码、一个补码和过量N都是指不同的方法

过量N表示法意味着,通过将常数N添加到所有数字中来处理负数,这样就只能处理正数。因此,值0表示-N,值1表示-N+1,以此类推。值N表示0


现在,我不确定你指的是哪本书,但求和公式通常指的是一种通过对一系列项求和来计算值的方法。在数字表示的上下文中,它通常为每个位分配一个“值”,这样设置位的值之和就可以给出编码的数字。当你对两个补码这样做的时候,你会得到一个公式,当你对多余的-N这样做的时候,你会得到一个稍微不同的公式,但是你应该能够在你引用的问题中看到/显示等价性。

如果这不是家庭作业,那么它是什么?你在用什么语言?除非我严重误解,这是数学,不是编程。也许可以尝试另一个StackExchange站点?一个是数学,一个是计算机科学。也就是说,你是否真的抓起一支铅笔试着去做,只是为了看看会发生什么?