BCD is a requirement for many financial calculations, which these machines were targeted for (e.g. running payroll).
Since the hardware was extremely limited they could not afford to support both binary and decimal, so everything ended up being decimal. This was actually not an uncommon choice on some of the early computers. For example the ENIAC was decimal too, although that one wasn't designed for business.
There used to be a lot more experimentation in early computers before everything became standardized. The Russians even did some early ternary computers, there was a lot of variety in word length (36bit systems), the 8-bit byte wasn't even invented yet.
You get arbitrary length arithmetic for free (the 1401 in the Computer History Museum runs a demo program that computes powers of 2, it only stops when it runs out of columns on the printer paper instead of bits in memory). Also there is no alignment to think about and no padding is necessary, which is nice when memory space is scarce as it was and considering the 1401 uses a variable word length instruction set. Plus it's easier to type into a key punch [0] when programming.
I suspect that in those early days many of the assumptions we take for granted in computer architecture were not foregone conclusions.
I think the design was much more of a clean slate. Arithmetic is normally done in decimal by people so that was a reasonable way to start thinking about it.
I think this point is a good lesson for system design. So much design these days is driven by accumulated "wisdom" which is immediately buried with another layer of software, without those previous layers even really being considered as to whether they were appropriate or not. Those assumptions can often make the overall system more complex than it could have been.
The 1401 was designed as a stored-program alternative to IBM's never-shipped WWAM World Wide Accounting Machine. WWAM was designed in IBM Europe in 1955. WWAM was to be a low-cost plugboard-programmed transistor computer to handle the same card tasks as IBM's existing and popular relay-based punch-card accounting equipment. WWAM was IBM's reaction to the threat of losing its many punch-card customers to a low-cost computer Gamma 3 made by French company Bull. 1401 uses the same ALU etc as WWAM, but with newer standard circuit modules. Both use arbitrary-length decimal fields, just like the punch card machines before them.
Several incompatible IBM machines in the 7000 series also used arbitrary length decimal numbers, not binary words.
At Burroughs, the "Medium Systems" B2500-B4800 series were similarly decimal only with arbitrary length numbers. They got extended with fixed-length decimal accumulator and index registers, and competed with IBM's mid range 360 and 4331 systems. Building a decimal-addressed memory using binary-addressed chips got increasingly kludgy.
It's actually bi-quinary. Inside the ALU, numbers are represented by two fields: an odd/even field with two dedicated signals for odd and even, and a field of 5 quinary "Q#" signals for 0/1, 2/3, 4/5, 6/7, 8/9. So it's a 7-bit representation as in Q8-Q6-Q4-Q2-Q0-B1-B0. There are two separate adders, one for each field, with borrows and overflow handled after partial results. Apparently, this helps with error checking in the ALU with limited circuitry. (There's exactly one Q# bit and exactly one B# bit high at any time. E.g., `0` is Q0 high and B0 high, `9` is Q8 high and B1 high.) Negative numbers are represented in 9's complement.
Values are converted from BCD to bi-quinary as they enter the adder and the result is translated back again. So, to the programmer, it's still a character-oriented machine and the ALU operates on a single character (= decimal digit) a time. (Apparently, IBM didn't even communicate any of this.)
A general feature of character oriented processing is that there is no fixed precision and fields may be of arbitrary length, but it's also obviously slower than (binary) bit-parallel processing. (Mind that the 1401 was a replacement for punched card appliances, which were all about fields of various character lengths, as found on 80-column cards.)
Reminds me of doing the same on a Commodore 64 with its 6502 processor in the mid-1980s. Typed in the program from a magazine. I don't remember if inner loop was in Basic or assembly language. Had to leave it running overnight to see a 160x200 image with 4 colors the next morning. I was surprised that this worked at all.
The progression from typing in programs like that from Compute! and various other magazines to commercial games like the Apache Gunship simulator with the keyboard overlay for controls was pretty mind blowing for teenage me.
10 comments
[ 5.1 ms ] story [ 41.6 ms ] threadWhat was the business justification for this? Was it ease-of-use for the businesses that leased these machines?
Since the hardware was extremely limited they could not afford to support both binary and decimal, so everything ended up being decimal. This was actually not an uncommon choice on some of the early computers. For example the ENIAC was decimal too, although that one wasn't designed for business.
There used to be a lot more experimentation in early computers before everything became standardized. The Russians even did some early ternary computers, there was a lot of variety in word length (36bit systems), the 8-bit byte wasn't even invented yet.
[0] https://en.wikipedia.org/wiki/Keypunch#/media/File:IBM26.jpg
I think the design was much more of a clean slate. Arithmetic is normally done in decimal by people so that was a reasonable way to start thinking about it.
I think this point is a good lesson for system design. So much design these days is driven by accumulated "wisdom" which is immediately buried with another layer of software, without those previous layers even really being considered as to whether they were appropriate or not. Those assumptions can often make the overall system more complex than it could have been.
Several incompatible IBM machines in the 7000 series also used arbitrary length decimal numbers, not binary words.
At Burroughs, the "Medium Systems" B2500-B4800 series were similarly decimal only with arbitrary length numbers. They got extended with fixed-length decimal accumulator and index registers, and competed with IBM's mid range 360 and 4331 systems. Building a decimal-addressed memory using binary-addressed chips got increasingly kludgy.
https://ibm-1401.info/1401Origins.html#Motivations-1
On the Bull Gamma 3: http://www.feb-patrimoine.com/english/gamma_3.htm
The Register had once a nice article on the occasion of the 1401's 50th anniversary: https://www.theregister.com/2009/11/17/ibm_1401_fiftieth_ann...
Values are converted from BCD to bi-quinary as they enter the adder and the result is translated back again. So, to the programmer, it's still a character-oriented machine and the ALU operates on a single character (= decimal digit) a time. (Apparently, IBM didn't even communicate any of this.)
A general feature of character oriented processing is that there is no fixed precision and fields may be of arbitrary length, but it's also obviously slower than (binary) bit-parallel processing. (Mind that the 1401 was a replacement for punched card appliances, which were all about fields of various character lengths, as found on 80-column cards.)
Ken Shirriff has you covered on this, as well: http://www.righto.com/2015/10/qui-binary-arithmetic-how-1960...
See also for a bit of history on this: https://ibm-1401.info/qui-binary.html
12-minute Mandelbrot: fractals on a 50-year-old IBM 1401 mainframe - https://news.ycombinator.com/item?id=25523904 - Dec 2020 (18 comments)
12-minute Mandelbrot: fractals on a 50 year old IBM 1401 mainframe - https://news.ycombinator.com/item?id=9243163 - March 2015 (40 comments)