Recent from talks
Nothing was collected or created yet.
Aiken code
View on Wikipedia
| Aiken code | |
|---|---|
| Digits | 4[1][2] |
| Tracks | 4[1][2] |
| Digit values | 2 4 2 1[1][2] |
| Weight(s) | 0..4[1][2] |
| Continuity | no |
| Cyclic | no[1][2] |
| Minimum distance | 1[1][2] |
| Maximum distance | 4[1][2] |
| Redundancy | 0.7 |
| Lexicography | yes[1][2] |
| Complement | 9[1][2] |
The Aiken code (also known as 2421 code)[1][2] is a complementary binary-coded decimal (BCD) code. A group of four bits is assigned to the decimal digits from 0 to 9 according to the following table. The code was developed by Howard Hathaway Aiken and is still used today in digital clocks, pocket calculators and similar devices[citation needed].
The Aiken code differs from the standard 8421 BCD code in that the Aiken code does not weight the fourth digit as 8 as with the standard BCD code but with 2.

The following weighting is obtained for the Aiken code: 2-4-2-1.
One might think that double codes are possible for a number, for example 1011 and 0101 could represent 5. However, here one makes sure that the digits 0 to 4 are mirror image complementary to the numbers 5 to 9.
| Aiken code | |||
|---|---|---|---|
| Decimal digit |
Aiken 2 4 2 1 code[1][2] | ||
| 0 | 0 0 0 0 | ||
| 1 | 0 0 0 1 | ||
| 2 | 0 0 1 0 | ||
| 3 | 0 0 1 1 | ||
| 4 | 0 1 0 0 | ||
| 5 | 1 0 1 1 | ||
| 6 | 1 1 0 0 | ||
| 7 | 1 1 0 1 | ||
| 8 | 1 1 1 0 | ||
| 9 | 1 1 1 1 | ||
See also
[edit]References
[edit]- ^ a b c d e f g h i j k Steinbuch, Karl W., ed. (1962). Taschenbuch der Nachrichtenverarbeitung [Handbook for Signal Processing] (in German) (1 ed.). Berlin / Göttingen / New York: Springer-Verlag OHG. pp. 71–74. LCCN 62-14511.
- ^ a b c d e f g h i j k Steinbuch, Karl W.; Weber, Wolfgang; Heinemann, Traute, eds. (1974) [1967]. Struktur und Programmierung von EDV-Systemen [Handbook for Information Systems - Volume II - Structure and programming of computer systems]. Taschenbuch der Informatik – Band II (in German). Vol. II (3 ed.). Berlin, Germany: Springer Verlag. pp. 98–100. ISBN 3-540-06241-6. LCCN 73-80607.
Further reading
[edit]- White, Garland S. (October 1953). "Coded Decimal Number Systems for Digital Computers". Proceedings of the Institute of Radio Engineers. 41 (10). Institute of Radio Engineers (IRE): 1450–1452. doi:10.1109/JRPROC.1953.274330. eISSN 2162-6634. ISSN 0096-8390. S2CID 51674710. (3 pages)
Aiken code
View on GrokipediaIntroduction
Definition and Purpose
Aiken code is a 4-bit complementary binary-coded decimal (BCD) code, also known as the 2421 code, designed to encode the decimal digits from 0 to 9 using weighted binary representations with bit weights of 2, 4, 2, and 1.[2] This encoding scheme assigns each decimal digit a unique 4-bit binary pattern, ensuring compatibility with binary logic circuits while preserving decimal structure.[1] The primary purpose of Aiken code is to facilitate efficient decimal representation in early digital systems, particularly by leveraging its self-complementary properties to simplify arithmetic operations such as subtraction through 9's complementation.[2] This weighted system, with bit values structured to enable direct complement operations, reduces the complexity of decimal arithmetic in hardware-limited environments like relay-based computers.[1] At its core, Aiken code employs exactly four bits per decimal digit, providing no encoding for values beyond 9 and thus restricting its use to purely decimal applications without binary overflow handling.[2] As a member of the BCD family, it operates in a non-positional manner, concentrating on individual digit encoding rather than full-number positional values. Named after Howard Aiken, it was used in systems like the Harvard Mark III.[2]Historical Context
The Aiken code emerged in the early 1950s as part of efforts in electromechanical and early electronic computing at Harvard University under Howard Hathaway Aiken. Aiken, a physicist and computing pioneer, led the development of large-scale calculators to automate complex numerical computations. His work began with a 1937 proposal for an automatic sequence-controlled machine that evolved into the Harvard Mark I (also known as the IBM Automatic Sequence Controlled Calculator), constructed by IBM and operational by 1944, which represented a major advancement in programmable electromechanical devices.[3] The code was first detailed in a 1953 paper by Garland S. White.[2] Emerging during the post-World War II era, it addressed the need for efficient decimal processing in relay-based systems and punched-card equipment used in computational demands such as ballistics and engineering calculations. Aiken's work was influenced by the limitations of existing technologies, including IBM's traditional one-punch-per-digit encoding on cards, which he criticized for inefficiency in arithmetic operations compared to binary-coded alternatives. The development aligned with broader efforts to bridge decimal human-readable data with machine-readable binary logic in non-all-electronic hardware.[4] A key motivation behind the Aiken code was to enable reliable decimal arithmetic for business and scientific applications, where pure binary representations proved cumbersome for decimal-centric tasks like accounting and simulations. Influenced by IBM's punched-card infrastructure, which dominated data processing at the time, Aiken aimed to optimize conversions between decimal inputs and machine operations without excessive hardware complexity. This design choice reflected the era's emphasis on practicality for electromechanical relays over fully electronic speed.[5] The code saw early adoption in Harvard's computing series and related IBM systems, notably the Harvard Mark III (completed in 1950), where it supported decimal handling in hybrid electronic-electromechanical architectures.[1][5] This integration enhanced the reliability of numerical computations in environments reliant on decimal wheels and magnetic drums, marking a foundational step in BCD usage for mid-20th-century computers.Encoding Scheme
Bit Assignments
The Aiken code, also known as the 2421 code, assigns a unique 4-bit binary pattern to each decimal digit from 0 to 9, utilizing bit weights of 2, 4, 2, and 1 from the most significant bit (MSB) to the least significant bit (LSB).[6][7] This encoding ensures that the binary representations sum to the corresponding decimal value when weighted appropriately. The complete mapping is presented in the following table:| Decimal | Aiken Code (MSB to LSB) |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 1011 |
| 6 | 1100 |
| 7 | 1101 |
| 8 | 1110 |
| 9 | 1111 |
