Decimal computer

Decimal computers are computers which can represent numbers and addresses in decimal as well as providing instructions to operate on those numbers and addresses directly in decimal, without conversion to a pure binary representation. Some also had a variable wordlength, which enabled operations on numbers with a large number of digits.
Decimal computers were common from the early machines through the 1960s and into the 1970s. Using decimal directly saved the need to convert from decimal to binary for input and output and offered a significant speed improvement over binary machines that performed these conversions using subroutines. This allowed otherwise low-end machines to offer practical performance for roles like accounting and bookkeeping, and many low and mid-range systems of the era were decimal based. During the 1970s, microprocessors with decimal instructions became common in electronic calculators, cash registers and similar roles, especially in the 8-bit era.
The rapid improvements in general performance of binary machines eroded the value of decimal operations. One of the last major new designs to support it was the Motorola 68000, which shipped in 1980. More recently, IBM added decimal support to their POWER6 designs to allow them to directly support programs written for 1960s platforms like the System/360. With that exception, most modern designs have little or no decimal support.
Early computers
Early computers that were exclusively decimal include the ENIAC, IBM NORC, IBM 650, IBM 1620, IBM 7070, UNIVAC Solid State 80. In these machines, the basic unit of data was the decimal digit, encoded in one of several schemes, including binary-coded decimal (BCD), bi-quinary and two-out-of-five code. Except for the IBM 1620 and 1710, these machines used word addressing. When non-numeric characters were used in these machines, they were encoded as two decimal digits.
Other early computers were character oriented, providing instructions for performing arithmetic on character strings of decimal numerals, using BCD or excess-3 (XS-3) for decimal digits. On these machines, the basic data element was an alphanumeric character, typically encoded in six bits. UNIVAC I and UNIVAC II used word addressing, with 12-character words. IBM examples include IBM 702, IBM 705, the IBM 1400 series, IBM 7010, and the IBM 7080.
Later computers
The IBM System/360, introduced in 1964 to unify IBM's product lines, used per character binary addressing, and also included instructions for packed decimal arithmetic as well as binary integer arithmetic, and binary floating point. It used 8-bit characters and introduced EBCDIC encoding, though ASCII was also supported.
The Burroughs B2500 introduced in 1966 also used 8-bit EBCDIC or ASCII characters and could pack two decimal digits per byte, but it did not provide binary arithmetic, making it a decimal architecture.
More modern computers
Support for BCD was common in early microprocessors, which were often used in roles like electronic calculators and cash registers where the math was all decimal. Examples of such support can be found in the Intel 8080, MOS 6502, Zilog Z80, Motorola 6800/6809 and most other designs of the era. In these designs, BCD was directly supported in the ALU, allowing it to perform operations on decimal data directly.
As part of the 8080 ISA, Intel BCD opcodes have remained in the x86 family to this day, although they are not supported in long mode. These instructions convert one-byte BCD numbers (packed and unpacked) to binary format before or after arithmetic operations. These operations were not extended to wider formats and hence are now slower than using 32-bit or wider BCD 'tricks' to compute in BCD. The x87 FPU has instructions to convert 10-byte (18 decimal digits) packed decimal data, although it then operates on them as floating-point numbers.
The Motorola 68000 series offered both conversion utilities as well as the ability to directly add and subtract in BCD. These instructions were removed when the Coldfire instruction set was defined.
One of the few RISC designs to directly support decimal is the IBM POWER architecture, which added support for a full decimal implementation in hardware starting with the POWER6 design. Decimal support had been part of their mainframe line, and as part of the broader effort to merge the iSeries and zSeries it was added to the POWER line so that a single processor could support workloads from these older machines with full performance. The IBM POWER6 processor and the IBM System z9 have implemented these types using the densely packed decimal binary encoding rather than BCD, the first in hardware and the second in microcode.
Decimal arithmetic is now becoming more common; for instance, three decimal types with two binary encodings were added to the 2008 IEEE 754r standard, with 7-, 16-, and 34-digit decimal significands.
See also
Ternary computer
Notes
References
Further reading
(NB. This title provides detailed description of decimal calculations, including explanation of binary-coded decimals and algorithms.)
(NB. At least some batches of this reprint edition were misprints with defective pages 115–146.)
Classes of computers
Early computers
Decimal computers