Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method of Adding Decimal Numbers by Means of Binary Arithmetic

IP.com Disclosure Number: IPCOM000051774D
Original Publication Date: 1981-Mar-01
Included in the Prior Art Database: 2005-Feb-10
Document File: 2 page(s) / 25K

Publishing Venue

IBM

Related People

Chroust, G: AUTHOR

Abstract

The simulation of decimal arithmetic on a machine without packed arithmetic necessitates a method for simulating decimal addition by binary arithmetic.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 67% of the total text.

Page 1 of 2

Method of Adding Decimal Numbers by Means of Binary Arithmetic

The simulation of decimal arithmetic on a machine without packed arithmetic necessitates a method for simulating decimal addition by binary arithmetic.

Decimal addition simulation is effected by simultaneously applying the following steps to as many digits (d1, d2, .., dn) of the decimal number as fit into the (binary = bin) word length of the object machine. 1. (Binary) addition of the two operands, 2. adding a `6' in each digit position (this generates the correct carry), and 3. subtracting a `6' in those places from which no carry resulted.

The possible carry from the next lower bin word and the carry to the next higher bin word have to be considered.

Detection of the places where no carry occurred is highly time-consuming. The new method used to detect ""no carry'' conditions consists of the following steps: Step 1. Let R6 be the result of operand 1 + operand 2 + X'6666..', i.e., R6 is the binary sum plus a `6' added in every digit position. Step 2. If the generation of R6 does not produce a carry from the highest position, subtract a `6' from the highest digit position of R6. Step 3. Generate RX = operand 1, XOR " operand 2. Step 4. For all digit positions, except those of the lowest order, compare the low-order bit of each digit of RX with its counter part in R6. If they agree, i.e., there was no carry from the next lower digit, subtract a `6' from the next lower digit position. Step 5. The R6 v...