52

The IBM 650, announced in 1953, was the world's first mass-produced computer. It represented numbers in decimal, which is understandable, both because it needed to work with exact money amounts, and because converting from binary to decimal for output would have been computationally demanding by the standards of the time.

It represented decimal numbers in bi-quinary form, which requires seven bits per digit, as compared to BCD which requires only four bits per digit. the technical limitations of the time make this choice more rather than less surprising; when bits are implemented with vacuum tubes, three extra bits per digit is a highly nontrivial cost.

What was the reason for using bi-quinary?

6
  • Doesn't bi-quinary use four bits? "4" = 0100, "5" = 1000, "9" = 1100
    – Whit3rd
    Commented Apr 15, 2019 at 8:50
  • 4
    @Whit3rd Nope, 4 is 01 10000. 5 is 10 00000. 9 is 10 10000 Commented Apr 15, 2019 at 8:58
  • 9
    Excuse me, 5 is not 10 00000. 5 is 10 00001. Commented Apr 15, 2019 at 9:10
  • 12
    That's SO wierd; it's llike a digital logic abacus register.
    – Whit3rd
    Commented Apr 15, 2019 at 10:10
  • 3
    @Whit3rd That is exactly it! I hope you don't mind. I took that comparison and included it in my answer. Commented Apr 15, 2019 at 10:17

4 Answers 4

30

Quibbling about the right meaning of "bit" aside, some advantages of the 2-of-7 biquinary representation are:

  • Simpler circuits. In a quinary adder circuit, the output of each of the 5 output lines becomes just a 5-way OR of binary ANDs of input lines. To implement this with primitive logic building blocks such as resistor-transistor-logic (or its vacuum-tube analogue) you can probably make do with one active component (tube or transistor) per output if you select your resistances carefully. This counts in an age where tubes and transistors are expensive discrete components of dubious reliability!

  • Faster operation -- with 10 biquinary digits there will be fewer gate delays in an arithmetic operation than with 36 binary digits -- especially when logic is still expensive and spending more logic on accelerating carry propagation is a science-fiction dream.

  • Error checking. If you don't really trust your logic building blocks, you want error checking everywhere. With 2-of-7 you can apply error checking to each intermediate digit in the computation. Any single component failure will lead to either too many or too few lines being active, so you can immediately pinpoint pretty exactly where you need to replace a part.

These advantages are not governing anymore, since transistors are pretty reliable and individually cheap. On the other hand, memory (whether in the form of register files, caches, or conventional) has come to dominate the hardware budget compared to ALUs, which means that the greater compactness of base-2 is a much larger consideration.

1
  • Also just came across medium.com/@bellmar/the-land-before-binary-cc705d5bdd70 - "So while 2 out of 5 code and bi-quinary can both do error checking, it is easier to look at a bi-quinary number and understand what its meaning is in decimal. The experience ends up being a little more user friendly."
    – rwallace
    Commented Apr 17, 2019 at 6:08
45

I will just explain what a bit is. It's a binary digit. 0 is numerically zero, 1 is numerically one. If you want to add 1 and 1, in binary it overflows. the result is 0, and a carry out. As you understand, other arithmetic operations can be done on bits. They take a fair bit of logic to implement. Binary is positional. That means that a 1 which is 4 places from the right is worth 24 = 16.

Biquinary is not based on this idea. Biquinary is based on the idea "let's count from zero to four and then also flipflop to another state where we're counting instead from 5 to 9". Just like we humans count to five on one hand, and then count to ten on another hand. Or an abacus, that has four beads on one part of the rod, and one more bead on the other part. Now, how that's implemented in the IBM 650 is with binary states (not binary digits!) to say which of {0,1,2,3,4} is true, and which of {range(0..4), range(5..9)} is true. This implementation of biquinary is two "one-hot" signals. That means that a 1 which is 4 places from the right is worth either 0+4 = 4 or 5+4 = 9.

A binary state is different from a bit, as it is one of true or false. true and false cannot be added. true and false are just the values represented in some way, often by whether or not a current is flowing.

It represented decimal numbers in bi-quinary form, which requires seven bits per digit, as compared to BCD which requires only four bits per digit.

Not so; just think about the nixies: A single vacuum tube which has ten cathodes that glow. They share a common ground, so a further ten electrical connections, one per digit, can each light up one of the digits inside the tube. These electrical connections are not really bits though. These electrical connections are binary states, so that if the nixie is showing a particular number, you've got one true and nine falses.

A nixie tube ZM1210

The biquinary tubes in the IBM 650 have a similar arrangement. So don't think about it as "seven bits", but as "one decimal digit", whose implementation involves seven electrical contacts which are very cheap. The tube stores or treats one decimal digit. And it is the tube which incurs the cost.

So the biquinary system is not really seven bits representing a decimal system. It is more like a "thing which counts from 0 to 4" (five possible states) plus a "thing which can flip between high and low" (two possible states). The numbers 2 and 5 were chosen since they are the prime factors of ten. So here are the numbers from 0 to 9:

    high   low    zero     one    two    three    four
    ----------------------------------------------------
 0: false  true   true     false  false  false    false
 1: false  true   false    true   false  false    false
 2: false  true   false    false  true   false    false
 3: false  true   false    false  false  true     false
 4: false  true   false    false  false  false    true
 5: true   false  true     false  false  false    false
 6: true   false  false    true   false  false    false
 7: true   false  false    false  true   false    false
 8: true   false  false    false  false  true     false
 9: true   false  false    false  false  false    true

Can you see? These are not bits because the word bit actually means "treat me as a base-2 digit". They are more like selectors. One selector says "I am one of zero, one, two, three and four". Another selector says "I am whatever the other guy said plus either zero or five". You can't add or subtract these selectors, or do any arithmetic on them, so these "selectors" are much, much cheaper than a bit in something like a modern computer.

These seven electrical signals together make up a decimal digit. And they correspond to seven "legs" on the bottom of the vacuum tube.

If you look at the table above, you can see that if you want to (for example) add two numbers, the process will naturally yield some kind of carry. It will flip the high/low pair between true false and false true, and will tell you which way it flipped. Now you know whether you've got to carry one to the next digit.

That arrangement is much simpler to implement than BCD which you mentioned it your question, where to figure out if you have a carry, you have to check if the (binary) addition got a carry, and if not, compare with 1001, and if higher carry one and then subtract 1001, otherwise carry 0. Biquinary addition is much cheaper. Especially if you use the vacuum tube that counts to five and flipflops between high and low.

10
  • 2
    I thought a nixie was 10 tubes stacked behind each other? The 650 front panel looks like 7 bits per digit. How does one tube handle a decimal digit? It can't be sensitive to 10 voltage levels?
    – rwallace
    Commented Apr 15, 2019 at 9:03
  • 4
    There were some Nixie tubes that worked directly with biquinary inputs; instead of having ten individually-connected digit cathodes and a single anode, they had five cathode pins, each connected to two digits (one each in the front and back halves of the tube), and two anodes (one in each half), only one of which was powered at a time. (There was also a wire screen between the halves, held at an intermediate voltage level, to prevent interference between the halves.) I believe that all of these used the two anodes to select between even/odd rather than 0-4/5-9, but it's the same basic idea. Commented Apr 15, 2019 at 11:48
  • 5
    A technical term that describes how the two signal groups are being used in the bi-quinary encoding is that each signal group encodes a number in one-hot fashion.
    – njuffa
    Commented Apr 15, 2019 at 13:45
  • 2
    @rwallace It's ten cathodes inside of one tube, wired up to six inputs (plus ground). No bits involved, that just wasn't how the tech worked - just like when counting with your fingers. Ten cathodes, the first signal told you which five of those the second signal selects. Digital doesn't imply binary - the 650 was a decimal (or more correctly, bi-quinary - two * five) digital computer. Don't try finding binary digits there.
    – Luaan
    Commented Apr 15, 2019 at 14:11
  • 1
    @rwallace: Addition can be done with a combination of counters that have "value is zero" outputs and a couple of latches each. To add the value in one set of counters to the value in another set, clear all the latches and then repeat the following sequence ten times for all digits in parallel: increment one addend. If the result is zero, set the "active" latch for that digit. On each cycle where the active latch is, or becomes set, increment the destination. If it is becomes zero when incremented, set the carry output. Then starting with the ones' place, increment each digit if the...
    – supercat
    Commented Apr 15, 2019 at 17:36
5

This isn't intended as an answer per se, but I want to provide some support for OmarL's explanation by quoting official documentation for the machine, which speaks of binary values as units of information rather than as digits of a base-2 number.

Here is how the IBM 650 Customer Engineering Manual of Instruction describes the machine's representation of numbers:

Number Systems for Digit Representation

A recorded magnetic spot is essentially a binary storage device, because it may have either of two magnetic polarities depending on the direction of current flow through the writing head at the time the spot is written. Polarization in one direction is take to mean a binary 1, while the opposite direction means a binary 0. Some system must be used so that a combination of these binary devices can represent the decimal digits 0 through 9.

In the 650 two such systems are used. The two-out-of-seven, bi-quinary, system is used for Read Buffer Storage (RBS) and Punch Buffer Storage (PBS) and the arithmetic units. The two-out-of-five system is used for general storage.

Figure I-1 shows how the bi-quinary system combines several binary 1 indications from two of seven parallel devices to represent each of the ten decimal digits. In the case of the read and punch buffer storages, the binary devices are recorded magnetic spots on seven parallel tracks. Successive 1 indications from the various combinations of two of the seven tracks during successive digit time intervals will indicate serially the decimal values of the digits of a word. In the case of the arithmetic units the paralleled binary devices are capacitor storage units. Seven parallel capacitors are used to represent each of the ten digits of a word. Each row is tested at its digit time by impulses from a drum-driven timing ring. Binary 1 indications from two of the seven capcitors will indicate the decimal value of the digit.

Notice that the bi-quinary system requires that there be a 1 indication from one and only one of the binary indicating devices in each of the two levels. It is this unique characteristic of the bi-quinary system that makes it easily adaptable to self-checking arrangements.

Notice also that the binary level indication determines whether the quinary level indication is to be read as it is or have five added to it to determine the deceimal value. This above- or below-five characteristic of the system makes it easily adaptable to calculating circuitry.

Figure I-2 shows how the two-of-five system combines different binary 1 indications from two-of-five parallel devices to represent each of the ten decimal digits. This system is used only for general storage largely because of the saving of heads and circuits that it affords. This system requires that all information entering general storage passes through a seven-to-five conversion matrix and that all information leaving general storage passes through a five-to-seven conversion matrix.

Figure I-1 from the linked document

Figure I-2 from the linked document

Note that it doesn't speak of binary digits at all. It does use 1 and 0 to denote the states of binary devices, but they aren't interpreted as numbers.

That document also includes many schematics and diagrams that you might find interesting.


Here is what the IBM 650 Operation Manual says:

Bi-quinary code

The type 650 translates the decimal-digit representation of the input data into bi-quinary digit representation for internal transmission and use.

The bi-quinary code makes use of seven possible units of information. Two of these units (or bits) are known as the binary portion of the code and have the assigned values of 0 and 5 (Figure 12). The remaining five units are known as the quinary portion of the code and have the assigned values of 0, 1, 2, 3, and 4 (Figure 12).

When this code is used, all digits 0–9 are represented by the combinary of one binary unit and one quinary unit of information (Figure 13). Because of this condition, it is possible to check for valid information. This checking is known as validity checking and will be discussed under that topic.

Signs of numbers are translated internally into a digit 9 for plus and a digit 8 for minus to enable ehecking of their validity.

Figure 12 from linked document Figure 13 from linked document

The term "bit" is mentioned but not used.

5

Storing a one-of-two selection using vacuum tube technology doesn't require one valve (combination of an anode, cathode, and one or more grids); it requires two. Thus, holding four bits would require eight valves. Because a one-of-five selection can be held with five tubes, holding a one-of-five selection plus a bit will require seven tubes.

Note that from an information-density standpoint, ternary notation would in many ways be ideal, since a pair of one-of-three selections would require six valves, which is the same number that would be required to hold three bits, but would have nine available states rather than eight. Using 36 valves as twelve one-of-three selections would allow a system to select one of 531,441 different states; using 38 valves as nineteen bits, by contrast, would only allow selection of 524,288 different states despite the fact that it would need two more valves. Using five valves to hold a one-of-five selection yields an information density lower than binary (a one-of-five selection is equivalent to 2.32 bits, but would take as many valves as storing 2.5 bits), but if one needs a circuit to hold 3.32 bits of information, using a bit plus a one-of-five selection will be cheaper than using four bits but only using them to hold a one-of-ten selection.

2
  • 1
    Very interesting observation. Note that the cost of the tubes shows up in two ways: First, the COG of manufacturing the computer - you need the tubes, the sockets, the space on the board, etc. etc. Second, the pain and difficulty of finding and replacing burned out or weakening tubes. In both cases reducing the cost by one tube for each decimal digit needed in your computer means 12% (or so) less cost one way or another ...
    – davidbak
    Commented Dec 11, 2020 at 2:46
  • @davidbak: I wonder if anyone caught the significance of 2^19 and 3^12? Probably not. I picked those numbers because they're the first powers of two and three that are roughly equal and, because their closeness is what leads to musical octaves being divided into twelve half-steps.
    – supercat
    Commented Jan 22, 2021 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .