自完成代码 [英] self completing code
问题描述
https://electronics.stackexchange.com/questions/20537/how识别自我补码
我已正确阅读,
但是是否有必要从9中减去数字?
but is it necessary that , the number need to be subtracted from 9 ?
因为是8421系统 12 = 1100
because in the 8421 system 12= 1100
如果我们减去15-12,则答案为3,即0011.
and if we subtract 15-12 , then the answer is 3 , which is 0011 .
所以它也是自我补充...
so it is also self complementing...
我不明白,给定数字需要从哪个数字中减去,该数字是否必须为9?
I don't understand that , the given number need to be subtracted from which number , is that number neccessary to be 9 ???
推荐答案
如果权重之和为9,则它是自补的 例如5211 =(5 + 2 + 1 + 1)= 9或2421 =(2 + 4 + 2 + 1)= 9 8421不是自我补充,所以,8421!= 9.
If the sum of the weights is 9 then it is self complementing e.g 5211=(5+2+1+1)=9 or 2421=(2+4+2+1)=9 8421 is not self complementing so ,8421!=9.
这篇关于自完成代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!