李正生, 马文彦, 闫杰. 格雷码的反码、补码与带符号格雷码的补码[J]. 微电子学与计算机, 2013, 30(5): 129-131,136.
引用本文: 李正生, 马文彦, 闫杰. 格雷码的反码、补码与带符号格雷码的补码[J]. 微电子学与计算机, 2013, 30(5): 129-131,136.
LI Zheng-sheng, MA Wen-yan, YAN Jie. 1's Complement and 2's Complement of Gray Code and 2's Complement of Signed Gray Code[J]. Microelectronics & Computer, 2013, 30(5): 129-131,136.
Citation: LI Zheng-sheng, MA Wen-yan, YAN Jie. 1's Complement and 2's Complement of Gray Code and 2's Complement of Signed Gray Code[J]. Microelectronics & Computer, 2013, 30(5): 129-131,136.

格雷码的反码、补码与带符号格雷码的补码

1's Complement and 2's Complement of Gray Code and 2's Complement of Signed Gray Code

  • 摘要: 针对格雷码算法较少的问题,研究了格雷码的求反、取补和带符号格雷码的补码表示.得到了首位取反即为格雷码的反码,再加1即为格雷码的补码的结论.补码表示的带符号格雷码的符号位的权为-1,n位二进制补码符号位的权为-2n-1.这些研究结果将会给格雷码的计算机运算带来方便.

     

    Abstract: For enriching Gray code algorithm,the negation and complement of Gray code and the 2 s complement representation of signed Gray code are studied.The conclusion of negating the first bit of Gray code is its 1 s complement and then adding 1 is its 2 s complement is gotten.The weight of symbol bit of signed Gray code is—1, and weight of symbol bit of signed binary is -2(n-1).

     

/

返回文章
返回