TECHNICAL ENGLISH II No.6May 16,2002

Machine Languages, Assembly Languages and High-Level Languages


Generality:

Programmers write instructions in various programming languages, some directly understandable by computers and others that require intermediate translation steps. Hundreds of computer languages are in use today. These may be divided into three general types:

1. Machine languages
2. Assembly languages
3. High-level languages

Any computer can directly understand only its own machine language. Machine language is the "natural language" of a particular computer. It is defined by the hardware design of that computer. Machine languages generally consist of strings of numbers (ultimately reduced to 1s and 0s) that instruct computers to perform their most elementary operations one at a time. Machine languages are machine dependent (i.e., a particular machine language can be used on only one type of computer). Machine languages are cumbersome for humans, as can be seen by the following section of a machine-language program that adds overtime pay to base pay and stores the result in gross pay.
*1300042774
+1400593419
+1200274027
As computers became more popular, it became apparent that machine-language programming was simply too slow and tedious for most programmers. Instead of using strings of numbers that computers could directly understand, programmers begun using English-like abbreviations formed the basis of assembly languages. Translator programs called assemblers were developed to convert assembly-language programs to machine language at computer speeds. The following section of an assembly-language program also adds overtime pay to base pay and sores the result in gross pay, but somewhat more clearly than its machine-language equivalent.
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
Although such code is clearer to humans, it is incomprehensible to computers until translated to machine language.
Computer usage increased rapidly with the advent of assembly languages, but programming in these still required many instructions to accomplish even the simplest tasks.
To speed the programming process, high-level language were developed in which single statements could be written to accomplish substantial tasks. The translator programs that convert high-level language programs into machine language are called compilers. High-level languages allow programmers to write instructions that look almost like everyday English and contain commonly used mathematical notations. A payroll program written in a high-level language might contain a statement as
Grosspay = basePay + overTimepay
Obviously, high-level languages are much more desirable from the programmer's standpoint than either machine languages or assembly languages. C, C++ and Java are among the most powerful and most widely used high-level programming languages.
The process of compiling a high-level language program into machine language can take a considerable amount of computer time. Interpreter programs were developed to execute high-level language programs directly without the need for compiling those programs into machine language. Although compiled programs execute much faster than interpreted programs, interpreters are popular in program-development environments in which programs are recompiled frequently as new futures are added and errors are corrected. Once a programs is developed, a compiled version can be produced to run most efficiently.

To remember:
The language of the computer
The only real computer language is machine language, a series of digits unintelligible to people.
Assembly language is still important because it gives the programmer total control of the computer's CPU and, as a result, produces compact, fast, and efficient code. High-level languages were developed to act as intermediaries between the programmer and the machine.
The first higher-level languages include C, C++, Java, XML, and Lisp.

What is a computer program?
A computer program is a collection of instructions that a computer's CPU can interpret and carry out.
Programmers create programs by typing statements into an editor.
The entire set of commands, as represented by the statements, is stored in a fie and referred to as program's source code.
Compiling is the process of converting source code into object code stored in an object file, the halfway point to an executable file.
A linker fits object files together to form an executable files.
Most computer languages have variables, which are parts of the computer's memory that a program reserves for its own use.


REVIEW QUESTIONS
1) Define the term machine language and high-level language. Give examples of each.
2) Give the definition of an "assembler" according to the next.
3) For what purpose is assembly language most often used?
4) What is a compiler?
5) Give two interpreted programming languages (without compilation)?



TECHNICAL ENGLISH II TOP PAGE