Hardware Reference
In-Depth Information
below it. In this way, the complexity can be mastered and computer systems can
be designed in a systematic, organized way. We call this approach structured
computer organization and have named the topic after it. In the next section we
will describe what we mean by this term. After that we will look at some historical
developments, the state of the art, and some important examples.
1.1 STRUCTURED COMPUTER ORGANIZATION
As mentioned above, there is a large gap between what is convenient for peo-
ple and what is convenient for computers. People want to do X , but computers can
only do Y . This leads to a problem. The goal of this topic is to explain how this
problem can be solved.
1.1.1 Languages, Levels, and Virtual Machines
The problem can be attacked in two ways: both involve designing a new set of
instructions that is more convenient for people to use than the set of built-in ma-
chine instructions. Taken together, these new instructions also form a language,
which we will call L1, just as the built-in machine instructions form a language,
which we will call L0. The two approaches differ in the way programs written in
L1 are executed by the computer, which, after all, can only execute programs writ-
ten in its machine language, L0.
One method of executing a program written in L1 is first to replace each in-
struction in it by an equivalent sequence of instructions in L0. The resulting pro-
gram consists entirely of L0 instructions. The computer then executes the new L0
program instead of the old L1 program. This technique is called translation .
The other technique is to write a program in L0 that takes programs in L1 as
input data and carries them out by examining each instruction in turn and executing
the equivalent sequence of L0 instructions directly. This technique does not re-
quire first generating a new program in L0. It is called interpretation and the pro-
gram that carries it out is called an interpreter .
Translation and interpretation are similar. In both methods, the computer car-
ries out instructions in L1 by executing equivalent sequences of instructions in L0.
The difference is that, in translation, the entire L1 program is first converted to an
L0 program, the L1 program is thrown away, and then the new L0 program is load-
ed into the computer's memory and executed. During execution, the newly gener-
ated L0 program is running and in control of the computer.
In interpretation, after each L1 instruction is examined and decoded, it is car-
ried out immediately. No translated program is generated. Here, the interpreter is
in control of the computer. To it, the L1 program is just data. Both methods, and
increasingly, a combination of the two, are widely used.
 
 
 
Search WWH ::




Custom Search