Node:Introduction, Next:Using a compiler, Previous:Preface, Up:Top
Introduction
What is a high-level language? Why is C unusual?
Any sufficiently complex object has levels of detail; the amount of detail we see depends on how closely we scrutinize the object. A computer has many levels of detail.
The terms low level and high level are often used to describe these layers of complexity in computers. The low level is buried in the computer's microchips and microcircuits. The low level is the level at which the computer seems most primitive and mechanical, whereas the high level describes the computer in less detail, and makes it easier to use.
You can see high levels and low levels in the workings of a car. In a car, the nuts, bolts, and pistons of the low level can be grouped together conceptually to form the higher-level engine. Without knowing anything about the nuts and bolts, you can treat the engine as a black box: a simple unit that behaves in predictable ways. At an even higher level (the one most people use when driving), you can see a car as a group of these black boxes, including the engine, the steering, the brakes, and so on. At a high level, a computer also becomes a group of black boxes.
C is a high-level language. The aim of any high-level computer language is to provide an easy, natural way to give a list of instructions (a computer program) to a computer. The native language of the computer is a stream of numbers called machine language. As you might expect, the action resulting from a single machine language instruction is very primitive, and many thousands of them can be required to do something substantial. A high-level language provides a set of instructions you can recombine creatively and give to the imaginary black boxes of the computer. The high-level language software will then translate these high-level instructions into low-level machine language instructions.