Subtracting BinarilySubtracting Binarily

How do you subtract? Let us try taking 4 away from 6. Coded, the subtraction looks like this:

  0110
0100

= 0010

This gives us the number 2. The result is correct, we can subtract.

We can, but the flip-flops cannot. In order to subtract a number, they must play a trick, by adding its "complement." By a "complement," we mean the opposite of a number. In binary numbers, this is the conversion of "0" into "1," and of "1" into "0." The complement of the coded number 4, "0100," would thus be "1011." Let us try adding it to 6, binarily "0110."

  0110
1011
  1 1

= 10001

That seems to be another absurdity: a total five bits long in a 4-figure code. There must be a trick in it. Let us try the same equation in the 35-channel code. It looks like this:

  0000000 0000000 0000000 0000000 0000110
1111111 1111111 1111111 1111111 1111011

= 10000000 0000000 0000000 0000000 0000001

But this tapeworm also is a digit too long: now it has 36 bits. What has happened?

That is binary arithmetic. In adding a complement there will always be one bit too many. But we can get rid of this bit very easily, by taking away the superfluous "1" in front and adding it to the rearmost bit:

  10000000 0000000 0000000 0000000 0000001
^--------------------------------------------------------------->1

= 0000000 0000000 0000000 0000000 0000010

Or, in the handier four-channel code:

  10001
^---->1

= 0010

In both cases the result of 6 minus 4 - check it up in the code - is a 2. So there is no mistake. The noble art of getting rid of superfluous bits is, in technical language, like "carrying" a unit. And this carrying does not present the slightest difficulty to the machine for its counting operations. A long line is simply connected up from the M position of the first flip-flop to the control line of the last one. In our 4-channel code it would look like this:


Illus. 27

The pulse which, when the complements are being added up, comes to the fore, is at once sent to the back and automatically added there. If you like, we can run through that "6 minus 4" case quickly on our flip-flops. The 6, coded "0110," has already been there and changed over two members of the Big Four-namely, B and C.


Illus. 28

The 4, coded "0100," is already on its way. But in its present condition we have no use for it anyway. First of all, it must be transcoded to its complement, "1011." For this purpose we have inserted a negater in every control line. A, C and D now obediently follow the pulse sequence "1011" and change over:


Illus. 29

And now something happens - you can follow it best on the right-hand side of the drawing: in flip-flop C, which is switched to M, an overflow pulse is released, causing its fellow B to change position likewise. So an overflow pulse is released in B also, causing A similarly to move to M and to release an overflow pulse there again. This dashes in the form of a carried unit to D. Now D changes over, likewise to M. Its overflow pulse runs to C and switches it to N. Thus the chain reaction finally comes to rest, and the result, "0010," can run peacefully into the storage. "0010" means 2, so the problem has been correctly solved. The four flip-flops finally won through. Subtracting four from six is astonishingly difficult if you insist on doing it electronically!


Illus. 30

You may possibly still wish to know how one divides with these calculators. In that case, we are afraid you are asking too much. Multiplication and subtraction are tough enough for them, so how can we expect them to divide? Well, they do it like the matrix calculators and simply keep on subtracting until nothing is left - in other words until there are no more units to be restored.

You will undoubtedly have noticed that far fewer storages are needed for binary calculations than for calculation by co-ordination. But we cannot do without storages altogether. You will find out why in the next chapter.

Every Memory is Magnetic >>>>

© by PhiloPhax & Lauftext >
Kybernetik - Was ist das?

First printed in Germany: 1963

 

Cybernetic Computer and Electronic Brain


The fascinating story of how computers work in clear, non-mathematical language