Low Level Language
Machine Code
-
A low-level language is one that is close to the fundamentals of the computer's hardware. The lowest-level language is machine code, which is understood directly by the hardware and does not require any interpretation or translation. Machine code consists entirely of strings of binary numbers: the famous zeroes and ones. While it can do anything any other language can do --- indeed, every other language must be translated into machine code by an interpreter --- it is not designed around the needs of the programmer, requires a very close understanding of a computer's processor and devices, and is almost impossible for a human to read.
Assembly Language
-
The next-"higher" programming language is assembly language, which is machine code with the instruction codes replaced by more intuitive commands. The command to put a value of 97 into a memory register called AL, for example --- which would in machine code be "10110000 01100001" --- would in assembly language be "MOV AL, 97", still a cryptic command but one much easier to learn. While it is still inefficient to write and requires a programmer to deal directly with her computer's hardware, it is a higher-level language than machine code because it is more abstract: It is closer to the writer.
High Level Language
-
Modern programmers write even in assembly language very rarely. Instead, they use one of many different higher-level languages like C, Java or Python, which programs called compilers or interpreters can translate into machine code. These languages remove the programmer from the physical realm of the hardware and into logical abstraction: Rather than moving hexadecimal values around memory registers, the programmer works with variables whose contents can be changed; loops that can be repeated until some condition is met; logical statements like IF, AND, THEN, OR and ELSE; and other tools. These languages are designed around the programmer, attentive to the ways she can be given the most power with the least difficulty.
Comparisons
-
High-level languages are not so called because they are "better" than low-level languages. Sometimes, the ability to talk more directly to a computer's processor in assembly language or even machine code can solve problems made difficult by the layers of abstraction in a higher-level language. A very high-level language may deal only with a particular operating system, like Microsoft Visual Basic; or with a particular program, like the "macros" in a word processor. These programs are very useful for someone who wants to manipulate Windows or Word without having to know the intricacies of how each works --- but such a language would be of no use to someone trying to write a program of his own, who would need something lower-level. A programmer thus chooses a language based on the job that he needs to do.
No comments:
Post a Comment