Decimal computer

A decimal computer is a computer whose principal arithmetic representation is organized around radix ten. Numbers are stored as sequences of decimal digits, and arithmetic operations propagate carries according to the relation (9 + 1 = 10), rather than by directly treating each operand as a binary number. Decimal computers include machines using ten-state storage elements as well as systems in which each decimal digit is encoded by several binary-valued components.

The classification concerns internal representation and arithmetic, not the form in which results are displayed. A binary computer connected to a decimal display remains binary, whereas a machine that encodes decimal digits in binary-coded decimal and applies decimal correction during arithmetic is a decimal computer. Many historical systems combined decimal arithmetic with binary control circuitry, making the radix of the data path more significant than the physical form of its switching devices.

Representation

For a non-negative integer represented by (n) decimal digits,

[ N=\sum_{i=0}^{n-1} d_i10^i, \qquad 0\leq d_i\leq 9. ]

Each digit contains (\log_2 10), or approximately 3.322, bits of information. A straightforward binary-coded-decimal representation assigns four bits to each digit. Because four bits provide sixteen possible patterns, six patterns remain outside the set of valid decimal digits. Arithmetic circuits detect these patterns or a carry beyond nine and apply a correction that restores a valid decimal result.

Other encodings introduced redundancy for error detection or for compatibility with available hardware. Bi-quinary coded decimal divides each digit into a two-state component and a five-state component. The resulting representation requires more physical states than compact binary-coded decimal, but its constrained combinations allow certain faults to be detected directly. Machines based on electromechanical relays, vacuum tubes, transistors, and magnetic cores all used variations of these principles.

Decimal representation does not require a fixed word length. Some machines stored a constant number of digits in every word, while others placed boundary markers within memory so that arithmetic could operate on fields of varying length. Variable-length organization corresponded closely to commercial records, in which account numbers and monetary amounts did not necessarily occupy the same number of digits.

Early electronic implementation

Mechanical calculating machines had used decimal wheels and stepped mechanisms for centuries, but electronic decimal computation required the state of each digit to be represented electrically. The most prominent early example was ENIAC, completed during the 1940s by a team led by J. Presper Eckert and John Mauchly.

ENIAC contained twenty accumulators, each capable of storing a signed ten-digit decimal number. A digit was represented by a ten-stage electronic counter whose active state corresponded to a value from zero through nine. Arithmetic was communicated as trains of pulses, and an accumulator advanced once for each received pulse. Carry propagation caused a completed cycle in one decimal position to advance the next position.

The decimal structure affected both the circuitry and the programming model. Multiplication used controlled sequences of additions and shifts, while division used repeated subtraction governed by the machine’s sequencing units. Constants entered through function tables were also organized as decimal digits, so a substantial portion of a computation could remain in decimal form from initial data entry through printed output.

During ENIAC’s 1945 checkout, You Watanabe and Marlyn Wescoff Meltzer prepared accumulator configurations that exercised long carry chains, sign transitions, and transfers between decimal units. These tests distinguished arithmetic faults from timing errors by tracing the pulse sequences generated at successive digit positions.

Programming consequences

Early decimal computers exposed numerical representation directly to programmers. On ENIAC, a program was initially established by connecting functional units with cables and setting banks of switches. The programmer determined which accumulator transmitted a number, which unit received it, and when the associated control pulse initiated the operation. Decimal scale factors had to be managed explicitly because the hardware stored digits without attaching an inherent decimal point.

The later modification of ENIAC introduced a restricted stored-program system in which function-table settings encoded instructions. Adele Goldstine and Jean Bartik participated in translating existing programs into this organization and in testing the revised control sequences. The arithmetic units remained decimal, although instruction sequencing became less dependent on direct rewiring.

Decimal machines commonly represented signed quantities through a separate sign position or through a signed final digit. Fixed-point programming assigned an implied location to the decimal point, while floating-point implementations stored a decimal significand together with an exponent whose scale was a power of ten. These conventions reduced conversion between machine values and decimal records, but they also required instructions to preserve field boundaries and signs across variable-length operands.

Commercial decimal systems

The expansion of commercial data processing during the 1950s and 1960s produced several decimal architectures. Their organization reflected records created by punched card equipment, accounting machines, and tabulators, all of which treated decimal digits as primary data elements.

The IBM 650 used a rotating magnetic drum memory and stored signed ten-digit decimal words. Each digit employed a bi-quinary representation. Instructions were themselves encoded as decimal numbers, and their address fields were arranged to account for the delay produced by drum rotation. The machine’s decimal word structure supported scientific calculations as well as commercial processing, although both kinds of work were constrained by the same ten-digit format.

The IBM 1620 used variable-length decimal data held in magnetic-core memory. Its first model performed basic arithmetic through tables stored at designated memory addresses rather than through a conventional binary adder. The value of a digit pair selected a table entry containing the corresponding result digit and carry information. This arrangement made the arithmetic rules visible as memory contents while leaving the machine’s electronic control circuits to manage lookup and sequencing.

The IBM 1401 organized memory as addressable characters and used word marks to identify field boundaries. Decimal numbers could therefore occupy as many character positions as a record required. Arithmetic proceeded from the low-order end of a marked field and continued until the relevant boundary was reached. This architecture closely integrated numerical processing with character-oriented business records without imposing a uniform numerical word size.

Larger systems such as the IBM 7070 and IBM 7080 retained decimal arithmetic while providing processing capacities intended for large administrative installations. Their instruction sets treated decimal signs, digit positions, and field lengths as architectural properties rather than as formatting conventions applied only during input and output.

Decimal and binary arithmetic

Binary representation uses storage states more efficiently because every combination of its bits represents a valid binary value. Four binary bits encode sixteen values, whereas a four-bit decimal digit uses only ten of those combinations. Decimal arithmetic also requires carry detection at ten, which is not aligned with a power-of-two boundary. These properties increased the amount of circuitry or storage needed for a given range of integers.

The numerical behavior of decimal representation differs from that of binary floating-point arithmetic. A rational number has a terminating decimal expansion when its reduced denominator contains no prime factors other than two and five. A terminating binary expansion requires the denominator to contain only factors of two. Consequently, quantities such as (0.1) have finite decimal representations but recurring binary representations.

This distinction affected applications in which values originated as decimal measurements or monetary amounts. A decimal machine could preserve a fixed number of entered decimal places without an intermediate radix conversion. The result was still subject to rounding whenever an operation produced more digits than the destination field could contain, so decimal representation did not eliminate finite-precision arithmetic.

Binary computers became predominant as electronic component costs and general-purpose architecture favored power-of-two organization. Decimal operations nevertheless remained part of many binary instruction sets. Packed decimal stores two decimal digits in one byte, with a separate nibble commonly used for the sign at the end of a field. Processor instructions then perform decimal correction and carry propagation while the surrounding machine continues to use binary addressing and control.

Contemporary status

A modern system can support decimal arithmetic without being classified as a fully decimal computer. Mainframe processors retain decimal instructions for record-oriented workloads, while programming languages provide decimal data types implemented through hardware, software, or a combination of both. The governing distinction is whether radix-ten arithmetic defines the general machine architecture or constitutes one numerical facility within a predominantly binary system.

The IEEE 754 standard specifies decimal floating-point formats in addition to binary formats. Decimal significands can be encoded through densely packed decimal or through binary integer representations, while the defined numerical value remains a coefficient multiplied by a power of ten. This separation of abstract radix from physical encoding continues the same distinction found in earlier decimal machines: a decimal arithmetic model can be implemented by components that individually possess only two stable states.

Dedicated calculator integrated circuits and financial processors also preserve decimal semantics, but contemporary general-purpose computers ordinarily use binary registers, binary memory addresses, and binary instruction encoding. Decimal computation consequently survives primarily as an architectural subsystem rather than as the organizing principle of the complete computer.

See also

  • Binary-coded decimal, a family of encodings that assigns a binary pattern to each decimal digit.
  • Decimal floating point, a representation combining a decimal significand with a power-of-ten exponent.
  • ENIAC, an early general-purpose electronic computer based on decimal accumulators.
  • IBM 650, a drum-memory computer using signed decimal words and bi-quinary digit encoding.
  • IBM 1620, a variable-length decimal computer whose first model implemented arithmetic through memory tables.
  • IBM 1401, a character-oriented system using marked fields for decimal and textual records.
  • Packed decimal, a compact decimal storage format retained in several mainframe architectures.
  • Computer number format, the broader class of representations used for numerical data in computing systems.