On 10/11/2006 at 1:58 PM woodelf wrote:
What is XS3?
Sometimes called "excess three". Basically, a system of doing decimal
arithmetic on a binary computer by biasing decimal numbers by 3. Thus
decimal 0 = binary 0011; decimal 9 = 1100.
There are many other "BCD" codes, such as 5311, 2421. All of these (XS3,
5311, 2421) have the property that the binary one's complement of a number
is also the 9's complement--a property not enjoyed by 8421 decimal.
CDC 6000 COBOL used a type of XS3 for its decimal arithmetic--a rather
happy coincidence being that octal 33 was the display code for zero and 44
was the code for nine. It was possible to do addition and subtraction on
two 10-digit decimal numbers without resorting to branching--using only
shift, AND and ADD operations.
Cheers,
Chuck