Java Reference
In-Depth Information
High-Level Language
Assembly Language
Machine Language
1d [%fp-20], %o0
1d [%fp-24], %o1
add %o0, %o1, %o0
...
1101 0000 0000 0111
1011 1111 1110 1000
1101 0010 0000 0111
1011 1111 1110 1000
1001 0000 0000 0000
...
a + b
FIGURE 1.19 A high-level expression and its assembly language and
machine language equivalent
The high-level language expression in Figure 1.19 is readable and intuitive for
programmers. It is similar to an algebraic expression. The equivalent assembly
language code is somewhat readable, but it is more verbose and less intuitive.
The machine language is basically unreadable and much longer. In fact, only a
small portion of the binary machine code to add two numbers together is shown
in Figure 1.19. The complete machine language code for this particular expression
is over 400 bits long.
A high-level language insulates programmers from needing to know the
underlying machine language for the processor on which they are working. But
high-level language code must be translated into machine language in order to be
executed.
Some programming languages are considered to operate at an even higher
level than high-level languages. They might include special facilities for automatic
report generation or interaction with a database. These languages are called
fourth-generation languages, or simply 4GLs, because they followed the first three
generations of computer programming: machine, assembly, and high-level.
Editors, Compilers, and Interpreters
Several special-purpose programs are needed to help with the process of develop-
ing new programs. They are sometimes called software tools because they are
used to build programs. Examples of basic software tools include an editor, a
compiler, and an interpreter.
Initially, you use an editor as you type a program into a computer and store
it in a file. There are many different editors with many different features. You
should become familiar with the editor you will use regularly because it can dra-
matically affect the speed at which you enter and modify your programs.
 
Search WWH ::




Custom Search