News for hackers. Stuff that matters.
Re:Fractals on an IBM 1401 mainframe (2015) by uticus on Monday July 10, 2023 @06:36AM (#36664395)
> The IBM 1401 is based on decimal arithmetic, not binary... Addresses are in decimal.. All arithmetic is done in base-10.

What was the business justification for this? Was it ease-of-use for the businesses that leased these machines?

Re:Fractals on an IBM 1401 mainframe (2015) by nn3 on Monday July 10, 2023 @05:21PM (#36673130)
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.

Re:Fractals on an IBM 1401 mainframe (2015) by goatmobile on Monday July 10, 2023 @05:23PM (#36673168)
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.

[0] https://en.wikipedia.org/wiki/Keypunch#/media/File:IBM26.jpg

Re:Fractals on an IBM 1401 mainframe (2015) by ilaksh on Monday July 10, 2023 @06:58PM (#36674155)
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.

Re:Fractals on an IBM 1401 mainframe (2015) by dsand on Monday July 10, 2023 @07:52PM (#36674684)
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.

https://ibm-1401.info/1401Origins.html#Motivations-1

Re:Fractals on an IBM 1401 mainframe (2015) by masswerk on Tuesday July 11, 2023 @03:04AM (#36677408)
I came to say about the same. The IBM 1401 was really the next after punch card appliances and specifications owed much to those.

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...

Re:Fractals on an IBM 1401 mainframe (2015) by masswerk on Tuesday July 11, 2023 @03:34AM (#36677616)
It's actually bi-quinary; Inside the ALU numbers are represented by two fields, an odd/even field with two dedicated signals 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. Apparently, this helps with error checking in the ALU with limited circuitry. (Only one of the Q# bits can be high at any time and the B# field must have exactly one high-bit adhering to XOR.) Negative numbers are represented in 9's complement.

Kenn Shirriff has you covered on this, as well: http://www.righto.com/2015/10/qui-binary-arithmetic-how-1960...