Page 93 -
P. 93
68 CHAPTER 3 / A TOP-LEVEL VIEW OF COMPUTER FUNCTION
operation is performed on some data. For each step, a new set of control signals is
needed. Let us provide a unique code for each possible set of control signals, and let
us add to the general-purpose hardware a segment that can accept a code and gen-
erate control signals (Figure 3.1b).
Programming is now much easier. Instead of rewiring the hardware for each
new program, all we need to do is provide a new sequence of codes. Each code is, in
effect, an instruction, and part of the hardware interprets each instruction and gen-
erates control signals. To distinguish this new method of programming, a sequence
of codes or instructions is called software.
Figure 3.1b indicates two major components of the system: an instruction in-
terpreter and a module of general-purpose arithmetic and logic functions.These two
constitute the CPU. Several other components are needed to yield a functioning
computer. Data and instructions must be put into the system. For this we need some
sort of input module.This module contains basic components for accepting data and
instructions in some form and converting them into an internal form of signals us-
able by the system.A means of reporting results is needed, and this is in the form of
an output module.Taken together, these are referred to as I/O components.
One more component is needed. An input device will bring instructions and
data in sequentially. But a program is not invariably executed sequentially; it may
jump around (e.g., the IAS jump instruction). Similarly, operations on data may re-
quire access to more than just one element at a time in a predetermined sequence.
Thus, there must be a place to store temporarily both instructions and data. That
module is called memory, or main memory to distinguish it from external storage or
peripheral devices.Von Neumann pointed out that the same memory could be used
to store both instructions and data.
Figure 3.2 illustrates these top-level components and suggests the interactions
among them. The CPU exchanges data with memory. For this purpose, it typically
makes use of two internal (to the CPU) registers: a memory address register
(MAR), which specifies the address in memory for the next read or write, and a
memory buffer register (MBR), which contains the data to be written into memory
or receives the data read from memory. Similarly, an I/O address register (I/OAR)
specifies a particular I/O device. An I/O buffer (I/OBR) register is used for the ex-
change of data between an I/O module and the CPU.
A memory module consists of a set of locations, defined by sequentially num-
bered addresses. Each location contains a binary number that can be interpreted as
either an instruction or data.An I/O module transfers data from external devices to
CPU and memory, and vice versa. It contains internal buffers for temporarily hold-
ing these data until they can be sent on.
Having looked briefly at these major components, we now turn to an overview
of how these components function together to execute programs.
3.2 COMPUTER FUNCTION
The basic function performed by a computer is execution of a program, which con-
sists of a set of instructions stored in memory.The processor does the actual work by
executing instructions specified in the program.This section provides an overview of