# Lecture 1:  Computing Machines

## 1. Music Box

A music box is an automatic mechanical instrument for producing music. It has the following parts:

1. The crank allows us to turn the cylinder of the music box.
2. The cylinder is studded with tiny pins and is turned by the crank.
3. The pins on the cylinder, in turn, displace the teeth in the steel comb. The tines of the comb "ring" or sound as they slip off the pins.
4. The music box sits on the bedplate, which is usually screwed onto a wooden box. The box resonates and amplifies the sound.

Is the music box a computer? We may want to respond negatively because:

• A computer may be programmed for different tasks, but the music box usually plays a single tune.
• A computer is electrical, but the music box is mechanical.
• A computer is complicated, but a music box is simple, whatever that means.

As for the first objection, there are music boxes that may be programed, such as the DIY Music Box Kit below:

One punches the notes in a strip of paper that is fed into the box. The box has teeth that "read" the music of the paper strip. The other two objections are not relevant, either. In a real sense, a music box is a computer, albeit a simple one.

## 2. Machines

The music box is a mechanical machine. As we will see, machines that compute predate computers by a few thousands years. Since this course is about computing, we should look at these machines in history and look at their shared properties which allow them to compute.

### A History of Information Technology and Systems

Some of the important representative machines are:
• Abacus (3000 BC): The first mechanical calculator. Here, numbers are represented via columns of beads sliding on wires. You should play with the Abacus Applet online to see how one may add numbers easily with the abacus.
• Pascaline (1642): Invented by Blaise Pascal, this machine was a mechanical computer that could add and subtract using gears.
• Jacquard Loom (1801): This mechanical loom was controlled by punch cards with punched holes. The idea of using punch cards to program machines was later used for a variety of machines, such as the music box above, the Ampico Piano, and IBM Punch Cards.
• ENIAC (1946): The first general-purpose electronic computer, the ENIAC was programmed by manipulating switches and moving cables.

Observe that each machine has the following parts:

• Input: We need to provide information into the machine. This can be done by beads (Abacus), gears (Pascaline), paper strip (Loom), or switches (ENIAC).
• Representation: To do this, we need to decide how we will represent information. For example, the lower beads on the Abacus are powers of 10. Each upper bead is five times the value of a lower bead in its column.
• Processing unit: Each machine has some way of processing the information. In the music box, the studded cylinder and steel comb make music.
• Output: Each machine has a way of returning the result of the computation. The music box produces music, the abacus "shows" the result, and the loom makes textile.

## 3. Properties of Machines

Machines that compute are intricate and complex. Let us compare the parts of the music box with several other "machines" that we are familiar with.

Music Box Computer Human Afra's MacBook Pro
crank clock biological clock 2.3 GHz or 2.3 billion cycles per second
comb & cylinder CPU brain (gray matter) Intel Core 2 Duo (1 processor, 2 cores)
teeth for reading strip input devices the 5 senses keyboard, trackpad, camera, etc.
music output devices voice, muscles display, speakers
none memory memory 4 gigabytes = 4,294,967,296 = 232 bytes
paper strip hard drive books 297.77 gigabytes (billion bytes)
mechanical electrical biological 120 V

Note: On a Mac, you may get information about the computer using the Sysem Profiler. This comparison brings us to our first concept of computing:

Concept 1: Computing has little to do with (modern) computers.

Of course, we are being a bit extreme here, but remember that computing predates computers by a few thousand years. It is important to separate the two concepts mentally.

## 4. Modern Computer

The modern computer is organized like other computing machines:

Above, the arrows are where communication happens. We need to have a way of giving input to the processor. The processor, in turn, needs to be able to talk with both the memory and the hard disk, both giving and getting information. Finally, the processor needs to be able to tell us the result of the computation. All this communication is handled by the operating system. This brings us to our second concept.

Concept 2: Computing requires communication, which needs languages.