Decimal computer

Last updated

IBM 650 front panel with bi-quinary coded decimal displays IBM-650-panel.jpg
IBM 650 front panel with bi-quinary coded decimal displays

A decimal computer is a computer that can represent numbers and addresses in decimal and that provides 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.

Contents

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.

The IBM System/360 line of binary computers, announced in 1964, included instructions that perform decimal arithmetic; other lines of binary computers with decimal arithmetic instructions followed. During the 1970s, microprocessors with instructions supporting decimal arithmetic 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) [1] 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, [2] IBM 7010, and the IBM 7080.

Some early binary computers, such as the Honeywell 800 [3] and the RCA 601, [4] [5] also had decimal arithmetic instructions. Some others had special instructions, such as CVR and CAQ on the IBM 7090, that could be used to speed up decimal addition and the conversion of decimal to binary. [6]

Later computers

The IBM System/360 family of computers, introduced in 1964 to unify IBM's product lines, uses binary addressing, binary integer arithmetic, and binary floating point; it also includes instructions for packed decimal integer arithmetic. [7]

Some other lines of binary computers added decimal arithmetic instructions. For example, the Honeywell 6000 series, based on the binary GE-600 series, offered, in some models, an Extended Instruction Set that supported packed decimal integer arithmetic and decimal floating-point arithmetic. [8]

IBM's lines of midrange computers, starting with the System/3 in 1969, [9] are binary computers with decimal integer instructions.

The VAX line of 32-bit binary computers from Digital Equipment Corporation, introduced in 1977, also includes packed decimal integer arithmetic instructions.

The Burroughs Medium Systems, beginning with the Burroughs B2500 and B3500 in 1966, provides only decimal arithmetic, including decimal addressing, 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.

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. [10] 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. [11] 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. [12] These instructions were removed when the Coldfire instruction set was defined.

The 2008 revision of the IEEE 754 floating-point standard adds three decimal types with two binary encodings, with 7-, 16-, and 34-digit decimal significands. [13]

One of the few RISC instruction sets to directly support decimal is IBM's Power ISA, which added support for IEEE 754-2008 decimal floating-point starting with Power ISA 2.05. Decimal integer support had been part of their mainframe line, and as part of the broader effort to merge the iSeries and zSeries decimal arithmetic was added to the POWER line so that a single processor could support workloads from these older machines with full performance.[ citation needed ] The IBM POWER6 processor is the first Power ISA processor that implemented these types, using the densely packed decimal binary encoding rather than BCD. [14] Starting with Power ISA 3.0, decimal integer arithmetic instructions were added.

z/Architecture, the 64-bit version of IBM's mainframe instruction set, added support for the same encodings of IEEE 754 decimal floating-point, starting with the IBM System z9. [14] Starting with the z15 processor, vector instructions to perform decimal integer arithmetic were added. [15]

See also

Notes

    Related Research Articles

    <span class="mw-page-title-main">Binary-coded decimal</span> System of digitally encoding numbers

    In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used for a sign or other indications.

    <span class="mw-page-title-main">Floating-point arithmetic</span> Computer approximation for real numbers

    In computing, floating-point arithmetic (FP) is arithmetic that represents subsets of real numbers using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. Numbers of this form are called floating-point numbers. For example, 12.345 is a floating-point number in base ten with five digits of precision:

    <span class="mw-page-title-main">IBM 650</span> Vacuum-tube 1950s computer system

    The IBM 650 Magnetic Drum Data-Processing Machine is an early digital computer produced by IBM in the mid-1950s. It was the first mass produced computer in the world. Almost 2,000 systems were produced, the last in 1962, and it was the first computer to make a meaningful profit. The first one was installed in late 1954 and it was the most-popular computer of the 1950s.

    The IEEE Standard for Floating-Point Arithmetic is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating-point implementations that made them difficult to use reliably and portably. Many hardware floating-point units use the IEEE 754 standard.

    Hexadecimal floating point is a format for encoding floating-point numbers first introduced on the IBM System/360 computers, and supported on subsequent machines based on that architecture, as well as machines which were intended to be application-compatible with System/360.

    <span class="mw-page-title-main">36-bit computing</span> Computer architecture bit width

    In computer architecture, 36-bit integers, memory addresses, or other data units are those that are 36 bits wide. Also, 36-bit central processing unit (CPU) and arithmetic logic unit (ALU) architectures are those that are based on registers, address buses, or data buses of that size. 36-bit computers were popular in the early mainframe computer era from the 1950s through the early 1970s.

    The Burroughs B2500 through Burroughs B4900 was a series of mainframe computers developed and manufactured by Burroughs Corporation in Pasadena, California, United States, from 1966 to 1991. They were aimed at the business world with an instruction set optimized for the COBOL programming language. They were also known as Burroughs Medium Systems, by contrast with the Burroughs Large Systems and Burroughs Small Systems.

    In computing, a word is the natural unit of data used by a particular processor design. A word is a fixed-sized datum handled as a unit by the instruction set or the hardware of the processor. The number of bits or digits in a word is an important characteristic of any specific processor design or computer architecture.

    The Intel BCD opcodes are a set of six x86 instructions that operate with binary-coded decimal numbers. The radix used for the representation of numbers in the x86 processors is 2. This is called a binary numeral system. However, the x86 processors do have limited support for the decimal numeral system.

    Chen–Ho encoding is a memory-efficient alternate system of binary encoding for decimal digits.

    Densely packed decimal (DPD) is an efficient method for binary encoding decimal digits.

    Extended precision refers to floating-point number formats that provide greater precision than the basic floating-point formats. Extended precision formats support a basic format by minimizing roundoff and overflow errors in intermediate values of expressions on the base format. In contrast to extended precision, arbitrary-precision arithmetic refers to implementations of much larger numeric types using special software.

    Decimal floating-point (DFP) arithmetic refers to both a representation and operations on decimal floating-point numbers. Working directly with decimal (base-10) fractions can avoid the rounding errors that otherwise typically occur when converting between decimal fractions and binary (base-2) fractions.

    The IEEE 754-2008 standard includes decimal floating-point number formats in which the significand and the exponent can be encoded in two ways, referred to as binary encoding and decimal encoding.

    In computing, decimal32 is a decimal floating-point computer numbering format that occupies 4 bytes (32 bits) in computer memory. It is intended for applications where it is necessary to emulate decimal rounding exactly, such as financial and tax computations. Like the binary16 format, it is intended for memory saving storage.

    In computing, decimal64 is a decimal floating-point computer numbering format that occupies 8 bytes in computer memory. It is intended for applications where it is necessary to emulate decimal rounding exactly, such as financial and tax computations.

    decimal128 is a decimal floating-point computer number format that occupies 128 bits in computer memory. Formally introduced in IEEE 754-2008, it is intended for applications where it is necessary to emulate decimal rounding exactly, such as financial and tax computations.

    BCD, also called alphanumeric BCD, alphameric BCD, BCD Interchange Code, or BCDIC, is a family of representations of numerals, uppercase Latin letters, and some special and control characters as six-bit character codes.

    The following outline is provided as an overview of and topical guide to computing:

    In computer engineering, a register–memory architecture is an instruction set architecture that allows operations to be performed on memory, as well as registers. If the architecture allows all operands to be in memory or in registers, or in combinations, it is called a "register plus memory" architecture.

    References

    1. UNIVAC 1005 Extended System Programmers Reference Manual (PDF), Sperry Rand, p. 18, FSD-1089r1
    2. IBM 1401 Data Processing System: Reference Manual (PDF). IBM. April 1962. p. 20. A24-1403-5.
    3. "Data Words" (PDF). Honeywell 800 Programmer's Reference Manual (PDF). Minneapolis-Honeywell, DATAmatic Division. 1960. p. 24. It may interpret the 48 bits of a word in groups of 4 for the purpose of binary-coded-decimal operation, in groups of six for the purpose of alphanumeric operation, or as individual units of information for pure binary operation.
    4. "The RCA 603 Computer". RCA 601 Electronic Data Processing System - General Information Manual. RCA EDP. March 1961. p. 1. 96-15-000. Fixed word or half word arithmetic operations may be performed in both (sic) the binary, alphanumeric, and decimal modes.
    5. The RCA 601 System Design. International Workshop on Managing Requirements Knowledge. IEEE Computer Society. December 1960. doi:10.1109/AFIPS.1960.64.
    6. Reference Manual, IBM 7090 Data Processing System (PDF). IBM. March 1962. pp. 5557, 115–119. A22-6528-4.
    7. IBM (1964). IBM System/360 Principles of Operation (PDF). First Edition. A22-6821-0.
    8. Series 6000 Summary Description (PDF). Honeywell. 1971. pp. 6, 31, 34–36.
    9. IBM System/3 Card and Disk System Components Reference Manual (PDF) (Second ed.). IBM. April 1970. GA21-9103-1.
    10. "MASM Programmer's Guide". Microsoft. 1992. Archived from the original on 2007-07-15. Retrieved 2007-07-01.
    11. Jones, Douglas W. (2014-09-10) [1999]. "Arithmetic Tutorials". Iowa City, Iowa, USA: The University of Iowa, Department of Computer Science. Retrieved 2016-01-03.
    12. "Motorola M68000 Family Programmer's Reference Manual" (PDF). Retrieved 2007-07-01.
    13. "DRAFT Standard for Floating Point Arithmetic P754". IEEE. 2006-10-04. Retrieved 2021-08-31.
    14. 1 2 Cowlishaw, Mike F. (2015) [1981,2008]. "General Decimal Arithmetic". IBM. Retrieved 2016-01-02.
    15. IBM z15 (8561) Technical Guide (PDF). IBM. p. 3. SG24-8851-00.

    Further reading