摘要
将人类使用的十进制数据转换为计算机使用的二进制数据,是计算机领域的一个重要问题。十进制整数转换为二进制整数的经典方法就是"除基倒取余",数据较大时既不方便又容易出错。论文基于二进制整数各位的权值满足超递增序列以及二进制数的数符只有0和1两种情况的特有属性,提出了一种十进制整数转换为二进制整数的快速方法。文中也给出了该转换方法的一些具体转换实例,结果表明:该转换方法,比经典的"除基倒取余"转换方法更简单高效,当数据规模较大时,转换效率更高。
It is an important problem in computer field to convert a decimal data into a binary data used by the computers.The classic method to convert a decimal integer into a binary integer is inverting the remainder by dividing the base.However,the classic method is not convenient and easy to make mistakes when the data is large.Based on the unique attributes that the weight of each bit of the binary integer is a super increasing sequence and there are only 0and 1in the characters of the binary data,a fast method to convert a decimal integer into a binary integer is presented in this paper.Some examples of the conversion method are also given.The result shows that the new method is simpler and more efficient than the classic method,especially when the data is large.
出处
《计算机与数字工程》
2017年第2期332-334,408,共4页
Computer & Digital Engineering
基金
国家自然科学基金(编号:41571403)
中国博士后科学基金特别资助项目(编号:2012T50681)资助
关键词
十进制整数
二进制整数
整数转换
超递增序列
decimal integer
binary integer
integer conversion
super increasing sequence