📜 ⬆️ ⬇️

CARDIAC - do-it-yourself computer paper

If you take a piece of paper, a pen printer, scissors and glue ...


Introduction


In the summer computer school, we sometimes offer children to assemble a “bio-computer”, that is, a computing device from what lies literally under their feet. Since children do not know very well how computing devices are arranged, it usually turns out something like a picture under a spoiler. But some still make scores or abacus.
Biocomputer


And recently I came across a description of a computer model made of paper, developed in 1968 in Bell laboratories. The computer is called CARDIAC (CARDboard Illustrative Aid to Computation), which roughly translates to Cardboard Visual Aid for Computing. That is, in fact, this is not exactly a computer, since a person acts as a signal conductor, as well as an arithmetic logic device in it. Nevertheless, it allows you to understand some of the principles underlying modern computing. In addition, after a brief search, I found a description and materials for the manufacture of CARDIAC.

How does the computer


CARDIAC consists of two blocks - memory and processor. Several paper strips are inserted into the processor unit with the help of which you need to select the instruction being executed. In addition, the tape is inserted into the memory block, where the output takes place, and the tape with the input data is inserted into the processor.

')

Memory


The computer has 100 memory cells with addresses from 00 to 99. Each of them can be used to store one instruction or one three-digit number. Any of the cells can be overwritten, so if you prefer, you can even write a self-modifying program. Values ​​in the cells are entered using a pencil, and modified using a pencil and eraser. At the same time, the value 01 is always “flashed” in cell 0. It is very convenient to use for increment, since the computer does not have commands with direct values ​​of the arguments.

Here is what the original memory block looks like:


Instruction counter


In the original, the ladybug is used as an instruction counter, as in the figure above. It is inserted into special holes punched in each of the memory cells. Since I didn’t want to make 100 holes, I used another ladybug to indicate the command counter - I just laid it on the desired cell.



Battery


The only register in the computer is the battery. It is used to perform arithmetic operations (addition, subtraction, shift), as well as for conditional transitions. Unlike memory cells, a battery can store 4 decimal places.

Command system


Each instruction is encoded using a three-digit decimal number. The first digit is always an operation code. The remaining two digits are usually the address of the cell with which the instruction operates.

CARDIAC can "execute" 10 different instructions (with codes from 0 to 9):


Manufacturing computer


I printed the enclosed materials on thick paper, cut out all the necessary holes, inserted moving strips inside and glued both blocks together.







How does all this work?


The functioning of the computer is the sequential execution of instructions. Before you start, you need to look at where the ladybug is (that is, the instruction counter) and move the strips to type in the value from this memory cell in the “Instruction Register” window.



Then you need to follow the arrows, starting with the inscription “Start” and follow all the instructions. For example, in the picture above, you must first move the instruction counter forward, and then add the contents of cell 41 to the battery.

Of course, calculations (addition, subtraction and shift) will have to be done manually. To do this, next to the inscription "Accumulator" there are several windows that allow you to perform addition / subtraction in a column.

Computer operation example


To begin with, I “entered” (that is, wrote a pencil into memory cells from 17 to 23) the first of the programs listed in the manual:
AddressValueDecryption
17034Enter the value in cell 34
18035Enter the value in cell 35
nineteen134Copy cell 34 to battery
20235Add cell 35 to battery
21636Write battery to cell 36
22536Display cell 36
23900Stop and reset


This program adds two numbers that are read from the input tape, and writes the result to the output tape.
The input instruction reads the value from the input tape, writes it to the specified cell, and then moves the input tape one step further so that the next value appears in the Input window. You will need to use a pencil (and, possibly, an eraser) to write the value to the memory cell.

After executing this program with input values ​​42 and 128, the memory state became as follows:



"Speed" computer


What is a review of a computer without benchmarks? I took from the manual the following program intended for multiplying two numbers.
AddressValueDecryption
07068Enter values ​​in cell 68
08404Zero the battery using a shift of 4 to the right
09669Write battery to cell 69
ten070Enter values ​​in cell 70
eleven170Load cell 70 into battery
12700Subtract cell 0 (i.e., value 1) from battery
13670Write battery to cell 70
14319If the battery has a negative value, then go to the address 19
15169Load cell 69 into battery
sixteen268Add cell 68 to battery
17669Write battery to cell 69
18811Go to address 11
nineteen569Display cell 69
20900Stay


I ran this program for input data 5 and 3. It was necessary to execute 34 instructions, for which it took me a little less than 15 minutes. Therefore, the frequency of following the instructions for this computer (complete with me) was about 38 MHz (not to be confused with MHz).

Contents of memory and output tape



Other programs


The creators of CARDIAC approached the issue seriously and developed (not counting the above) the following programs:


Links


Video demonstration of the original:


Source: https://habr.com/ru/post/222277/


All Articles