Information Technology Reference
In-Depth Information
a memory location called M on the pad. We need an instruction that transfers
the contents of register A or B into M or that moves the contents of M into reg-
ister A or B. We will also need to be able to manipulate the program counter so
we can keep track of the current number in register X. We therefore need an
operation that can change this stored number as well as a “clear” instruction
so that we can wipe out what was in a register and set it to zero. Then there
are the instructions for the basic arithmetic operations, such as “add.” These
instructions will allow us to add the contents of register B to the contents of
register A and update the contents of register A with the sum A + B. We also
need the logical operations: the logic gates AND and OR that allow the com-
puter to make decisions depending on the input to these gates. This capability
is important because it enables the computer to follow different branches of a
program depending on the result of the logical operation. We therefore need to
add another class of instructions that enable the computer to “jump” to a spe-
cific location. This instruction is called a conditional jump , an action in which the
computer jumps to the new location in the program only if a certain condition
is satisfied. This conditional jump instruction allows the machine to leap from
one part of a program to another. And finally we will need a command to tell
the computer when to stop, so we should add a “Halt” instruction to our list.
These elementary instructions now enable us to get the computer to do
many different types of calculations. The machine is able to perform complex
operations by breaking them down into the basic operations it understands. In
the example above, our computer had only four registers. In modern comput-
ers, although the underlying concepts are exactly the same, a larger set of basic
instructions and registers is typically built into the hardware. The lesson we
should take from the file clerk analogy is this. As long as our file clerk knows
how to move data in and out of registers and can follow a sequence of simple
instructions using a scratch pad, he can accomplish many different complex
tasks. Similarly, a computer does all of these tasks completely mindlessly, just
following these very basic instructions, but the important thing is that it can do
the work very quickly. As Richard Feynman ( B.3.1 ) says, “The inside of a com-
puter is as dumb as hell but it goes like mad!” 6 A computer can perform many
millions of simple operations a second, and multiply two numbers far faster
than any human. However, it is important to remember that, at its heart, a
computer is just like a very fast, dumb file clerk. It is only because a computer
can do the basic operations so quickly that we do not realize that it is in fact
doing things very stupidly.
B.3.1. Richard Feynman (1918-88)
lecturing on computing at the
workshop on Idiosyncratic Thinking
at the Esalen Institute. In this lecture
he explained in simple terms how
computers work and what they are
capable of. According to Feynman
calling computers data handlers
would be more fitting because they
actually spend most of the time
accessing and moving data around
rather than doing calculations.
Maurice Wilkes and the beginning of software
development
Let us now look at how the “file clerk model” is actually implemented
in real computers. Computers work by allowing small electric charges to
flow from the memory to collections of logic gates or to other memory loca-
tions. These flows are all regulated by von Neumann's fetch-execute cycle: at
each step, the computer reads an instruction from memory and performs the
specified action. The section of the computer that does the actual computing
is called the processor or the central processing unit (CPU). The processor has a
 
Search WWH ::




Custom Search