Last updated: 10/21/02

Paper and Pencil Computer: Preliminary Description

Here is a simple computer; The Paper and Pencil Computer. (The computer in the readings is more complicated.) While this is drastically simplified, it still illustrates the basic way that all computers work. First, the architecture, or what the parts are and how they are connected. In our diagram of a computer, this one has only four components:

  1. Inputs - only a keyboard (imagined)
  2. CPU - a really simple one, but we will look at it in detail
  3. Outputs - only a monitor (imagined)
  4. Primary storage - 32 bytes of RAM (not 32MB!)
  5. Secondary storage - well, something had to go. No secondary storage.
ppcarchb.gif (5103 bytes) What is not here that is in the readings:
  • Registers
  • Clock rate and word size
  • Cache

And in the Objectives,

  • Flags

The 32 bytes of memory are shown as eight rows of 4. They are numbered 0 through 31, starting at the upper left and going row by row. That number is the address of the memory location. The CPU will refer to the memory locations by this numerical address. Each byte also has its contents, which is the one byte or 8-bit number stored there.

Remember, both the instructions (program) and the data are stored in RAM while the program is being executed. Without a disk drive, there is a problem in getting the program and data into the memory locations, but we will ignore that. In the examples and problems here, the contents of the memory location will be given as part of the example / problem statement. How do they get there? Somebody else's problem. Next we describe the parts in more detail and how they work together.

The CPU:
The Central Processing Unit has two parts; the Control Unit and the the Arithmetic and Logic Unit

First, the Control unit. It follows the same cycle, time after time, but very quickly. Here is the basic cycle:

ppcmstr.gif (4664 bytes)

This is the master cycle that the computer follows. The desired location that the program starts at will be given as part of the example / problem statement. When the Control Unit fetches an instruction, it gets the value from memory and places it in the Instruction Register (IR). The memory fetch gets one byte, so the IR is one byte. Here is how it is used:

ppcir.gif (2162 bytes)

The specific instructions that the CPU can carry out are called its Instruction Set. Each CPU has its own unique instruction set. But all can add, subtract, multiply and divide, as well as do input and output.