CARDIAC - computer paper with your hands

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




Introduction
In summer school computer we sometimes offer children gather "biokomyuter", ie computing device from the fact that lying literally underfoot. Since children do not know very well how to construct computing devices, it usually turns out something like the picture under spoiler. But some still do abacus or abacus.
biocomputer



And recently I came across a description of the computer model, made of paper, developed in 1968 at Bell Labs. Computer called CARDIAC (CARDboard Illustrative Aid to Computation), loosely translated as cardboard visual aids on the calculations. That is, in fact, it's not quite the computer, since the conductor signals, and an arithmetic logic unit it serves people. Nevertheless, it allows us to understand some of the principles underlying modern computing. Besides, after a brief search, I found description and materials for making CARDIAC.

How does the computer
CARDIAC consists of two parts - a memory and a processor. In the processing unit inserted some paper strips with the help of which you need to follow the instructions to choose. In addition, the memory unit is inserted into the tape, which is output, and processing - tape with the input data.


Memory
The computer has a memory 100 with addresses from 00 to 99. Each of these may be used for storing a single instruction or a single three-digit number. Any of the cells can be overwritten, so if you want you can even write self-modifying program. The values ​​are entered in the cells with a pencil, and modified with a pencil and eraser. In this case the cell is always 0 "stitched" value 001. It is very useful for the growth rate, as the team with the immediate value of the argument have no computer.

Here is the original memory block:


Counter instructions
In the original, as a counter instruction uses the ladybug, as shown above. It is inserted into the holes punched in each of the memory cells. Since I did not want to do 100 holes, then to refer to the instruction counter, I used another ladybird - just spread it on the desired cell.



Battery
The only case in the computer - it's the battery. It is used to perform arithmetic operations (addition, subtraction, shift), as well as conditional branching. Unlike memory, a battery can store 4 decimal places.

System commands
Each instruction is encoded using a three-digit decimal number. The first figure - it is always the opcode. The other two figures usually represent the address of the cell, which operates the manual.

CARDIAC can "perform" 10 different instructions (with codes 0 to 9):
0 - INP - input values ​​from the input tape 1 - CLA - loading content into a memory cell battery 2 - ADD - adding memory to the accumulator 3 - TAC - jump to the specified address if the value is negative battery 4 - SFT - shift operation to the left and right by a specified number of decimal places 5 - OUT - conclusion in the memory cell output tape 6 - STO - recording in the memory cell battery 7 - SUB - Subtract the memory of the battery 8 - JMP - unconditional jump to the specified address 9 - HRS - stop and reset
Making computer
I printed the accompanying materials on thick paper, cut out all the necessary holes, inserted inside the moving strip and glue the two units.







How it works?
Computer operation is a sequential execution of instructions. Before starting, you need to see where the ladybird (ie instruction counter) and moving the strip type value of this memory cell in the window «Instruction Register».



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

Certainly calculations (addition, subtraction and shift) will have to be done manually. To do this, next to «Accumulator» has several windows that perform addition / subtraction in a column.

Example PC
For starters, I "introduced" (ie inscribed in pencil in the memory cell 17 to 23), the first of the programs listed in the manual:
Address th> Value th> Explanation th> 17 034 < / Enter the value in the cell 34 18 035 Enter the value in the cell 35 19 134 Copy cell battery 34 20 235 Append to the battery cell 35 21 636 Write a battery cell 36 22 536 Display the cell 36 23 < / 900 stop and reset
 This program adds two numbers that are read from the input tape, and writes the result to the output tape.
User input reads the value of the input tape, writes it to the given cell, and then moves the input tape is one step forward to in the window «Input» appeared the next value. In this case you must use a pencil (and perhaps an eraser) to write the value in the memory cell.

After running this program with the input values ​​of 42 and 128 memory status was as follows:



"Performance" computer
What is the review of the computer without the benchmarks? I took out the following management program designed for multiplying two numbers.
Address th> Value th> Explanation th> 07 068 < / Enter the value in the cell 68 08 404 Reset the battery using the shift to the right by 4 < / 09 669 Write a battery cell 69 10 < / 070 Enter the value in the cell 70 11 170 Download 70 cell battery in the 12 700 0 Subtract the cell (ie, a value of 1) of the battery < / 13 670 Write a battery cell 70 14 < 319 If the battery negative, then go to the address 19 15 169 Load cell 69 battery 16 268 Append to the battery cell 68 < 17 669 Write a battery cell 69 18 811 < / Go to web address 11 19 569 Display the cell 69 tr > 20 900 Stop
 I chased this program to input 5 and 3. In this case, you should have 34 instructions, which took me a little less than 15 minutes. Hence the frequency of instructions for the computer (complete with me) was about 38 MHz (not to be confused with MHz).

The contents of memory and the output tape



Other programs
CARDIAC creators approached the issue seriously and have developed (not including the above) the following programs:
The program for the "rollover" of bits Bootstrap to download programs from the input tape The mechanism of subroutine call program to play with him a handful (ie, the game Bache)
Links
Video demonstration of the original:


Page Wikipedia: en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation The page in Google+, dedicated computer: plus.google.com/u/0/communities/105401067945055411018 Materials for self-production computer: kylem.net/hardware/hardware.html

Source: habrahabr.ru/post/222277/

Tags

See also

New and interesting