3 ms·
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
by masswerk 3y ago
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.)
Ken Shirriff has you covered on this, as well: http://www.righto.com/2015/10/qui-binary-arithmetic-how-1960s-ibm.html 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 https://ibm-1401.info/qui-binary.html