计算机工程与应用 ›› 2018, Vol. 54 ›› Issue (14): 56-64.DOI: 10.3778/j.issn.1002-8331.1705-0111

• 理论与研发 • 上一篇    下一篇

机器数补码全字长数位说

周良泽1,周婷婷2   

  1. 1.荆楚理工学院 计算机工程学院,湖北 荆门 448000
    2.西北工业大学 软件与微电子学院,西安 710072
  • 出版日期:2018-07-15 发布日期:2018-08-06

New theory that the first bit of machine number complement code is a number bit instead of a sign bit of data

ZHOU Liangze1, ZHOU Tingting2   

  1. 1.School of Computer Engineering, Jingchu University of Technology, Jingmen, Hubei 448000, China
    2.School of Software and Microelectronics, Northwestern Polytechnical University, Xi’an 710072, China
  • Online:2018-07-15 Published:2018-08-06

摘要: 大量现行教材与专著中所表述的“机器数补码首位是符号位”之说,其补码加法法则不能被解释,令人困惑。对机器数补码全字长各位定义了位权,提出了“首位负权记数制”及新的机器数补码数据模型。在这个新的模型下,建立了补码与其真值的等量映射,论证了机器数补码的表值域,论证了补码真值负与非负的判定法则及机器数补码[x]与其真值[y]二者之间相互转换的求解法则;给出了机器数补码的加法法则,论证了在封闭运算条件下机器数补码加法的等效加法运算法则。揭示了机器系统内部补码信息表示的内涵与补码加法法则的真相,建立了“机器数补码全字长数位说”。“机器数补码首位符号说”中种种无可释然的困惑,在“机器数补码全字长数位说”里不复存在。

关键词: 补码的数据模型, 位权定义, 补码加法法则, 补码等效加法法则, 全字长数位说, 首位负权记数制

Abstract: “The first bit of the complement code in computer is a sign bit” is expressed in many textbooks and monographs presently, but the addition rule of complement code cannot be explained in the expressing system. In this paper, the weight of each bit in whole word length of complement code is defined, and the numeration system with negative weight for the first bit of data and a new data model for the complement code are presented. Based on the new data model, the mapping of equal value between complement code and his real value is built. The value range of complement code and the rule which decides whether complement code is negative or nonnegative are given. The interchanging rules between real value and complement code are given. The addition rule of complement code based on the new data model of complement code is given and the equivalent rule of addition of complement code under the condition of closed operation is also proven. The truths that computer system expresses complement code and the complement code addition rule in computer system are revealed. A new theory system that the first bit of complement code is number bit is built. The problems which cannot be explained in expressing system of “The first bit of the complement code in computer is a sign bit” are no longer in existence in the new theory system.

Key words: data model of complement code, weight definition of each bit in whole word length, addition rule of complement code, equivalent addition rule of complement code addition, the first bit of complement code is number bit, numeration system with negative weight for the first bit of data