“Logical” arithmetic on computers with two's complement binary arithmetic

“Logical” arithmetic on computers with two's complement binary arithmetic
复制标题

计算机上的“逻辑”算术与二进制补码算术

DOI:
10.1145/363397.363562
复制
发表时间:
1968
期刊:
Commun. ACM
影响因子:
--
通讯作者:
J. Ehrman
J. Ehrman
中科院分区:
--
文献类型:
--
作者:
J. Ehrman

文献摘要

被引文献

相似文献

在二进制计算机中,把字设定为具有正权重:在某些数的允许范围内,再加一个系数2,就足以解决用其它方法不容易处理的问题,或某些问题的自然表示。数据类型可以采用这种形式。我们常常发现,数的加与减是简单的,而数与除则显得困难。在这些情况下有时采取的方法是找到一种间接的方式来执行期望的处理,可能以每个字使用一个或多个位为代价;然而,如果操作数发现它们的自然表示使得在字中不存在无关紧要的位,则这样的方案可能变得笨拙和笨拙。本文的目的是设计出在二进制补码运算机器上直接用这些“逻辑”量进行乘除运算的精确B e方法,从而不必重新计算。需要对数据进行编码。这可以允许更有效地编程用于执行过程的算法:例如多精度算术[1],二进制到十进制转换或数论eMeulations。一般来说,算法只要求机器计算的两个N位操作数的乘积包含2N个有效位。在乘积为2N-1位的计算机上,可以使用算法的简化形式,该算法将无符号N位和
s i g n e d word in a binary computer as having positive ;weight: an additional factor of two in the allowed range of some numbers may be sufficient to permit the solution of :problems not easily handled otherwise, or the natural representa t ion of certain. types of data may take this }form. It is usually found that addition and subtraction of s u c h quantities are strMghtforward, while nmltiplieation and division appear to be diftieult. An approach sometimes taken• in these situations is to find an indirect way to p e r f o r m the desired processing, perhaps at the cost of w a s t i n g one or more bits per word; however, if the operands f i n d their naturM representation to be such that there are n o insignificant bits in a word, such schemes can become l e n g t h y and awkward. I t is the purpose of this paper to d e s c r i b e methods for performing multiplication and divis i o n directly with these "logical" quantities on machines with two's complement binary arithmetic, so that no re:. coding of the data is required. This may permit more efficient programming of algorithms for performing proeess: i n g such as multiple precision arithmetic [1], binary-todecimal conversion, or number theoretic eMeulations. In general, the algorithms require only that the machine's computed product of two N-bi t operands contain 2N significant, bits. On computers where the product eontMns 2N -1 bits, a simplified form of the algorithms may be used which Mlows the product of unsigned N-bit and