Gödel, Escher, Bach An Eternal Golden Braid by Douglas R. Hofstadter

(Dana P.) #1
PRINT the word pointed to in the instruction, as letters.
(In this case, the word is obviously interpreted not as a
number, but as a string of letters.)
JUMP to the word pointed to iII the instruction.
(In this case, the CPU is being told to interpret that particular
word as its next instruction.)

Unless the instruction explicitly dictates otherwise, the CPU will pick
up the very next word and interpret it as an instruction. In other words, the
CPU assumes that it should move down the "street" sequentially, like a
mailman, interpreting word after word as an instruction. But this sequen-
tial order can be broken by such instructions as the JUMP instruction, and
others.

Machine Language vs. Assembly language

This is a very brief sketch of machine language. I n this language, the types of
operations which exist constitute a finite repertoire which cannot be ex-
tended. Thus all programs, no matter how large and complex, must be
made out of compounds of these types of instructions. Looking at a pro-
gram written in machine language is vaguely comparable to looking at a
DNA molecule atom by atom. If you glance back to Fig. 41, showing the
nucleotide sequence of a DNA molecule-and then if you consider that
each nucleotide contains two dozen atoms or so-and if you imagine trying
to write the DNA, atom by atom, for a small virus (not to mention a human
being!)-then you will get a feeling for what it is like to write a complex
program in machine language, and what it is like to try to grasp what is
going on in a program if you have access only to its machine language
description.
It must be mentioned, however, that computer programming was
originally done on an even lower level, i.f possible, than that of machine
language-namely, connecting wires to each other, so that the proper
operations were "hard-wired" in. This is so amazingly primitive by modern
standards that it is painful even to imagine. Yet undoubtedly the people
who first did it experienced as much exhilaration as the pioneers of mod-
ern computers ever do ...
We now wish to move to a higher level of the hierarchy of levels of
description of programs. This is the a5sembly language level. There is not a
gigantic spread between assembly language and machine language; indeed,
the step is rather gentle. In essence, there is a one-to-one correspondence
between assembly language instructions and machine language instruc-
tions. The idea of assembly language is to "chunk" the individual machine
language instructions, so that instead of writing the sequence of bits
"010111000" when you want an instruction which adds one number to
another, you simply write ADD, and then instead of giving the address in
binary representation, you can refer to the word in memory by a name.

(^290) Levels of Description, and Computer Systems

Free download pdf