Computer Languages

Computer Languages

Why do we need computer languages? Computers understand only machine language, the binary stream of Os and 1s, which is difficult for us humans to comprehend. So programming languages were devised so that we can interact with our computers in a more natural way. There are two types of programming language: low-level and high-level.

  • Low-level languages are based on commands very similar to those that are understood by the CPU itself. The term 'low-level' language generally refers to either assembly language or the binary language of machine code. A highly specialist programmer would use one of these languages to generate very fast and compact code.

  • High-level languages resemble English or mathematical languages, and are used by programmers to create software. They are much casier to understand than low-level languages. High-level languages let the programmer concentrate on the basi ideas of a task. They use easily remembered commands, such as PRINT, OPEN, STOP, GOTO, and INCLUDE, as well as mathematical notations.

Machine code translation

Unless a program is written directly in machine code franslation into machine code will be needed before the program's instructions can be understood by the CPU. A special, language-dependent program is used for this translation. In very simple terms:

  • an assembler translates assembly language into machine code before execution;

  • a compiler translates a high-level language into machine code before execution;

  • an interpreter translates high-level language into machine code during execution;

  • a disassembler or reverse-compiler performs the translation in the opposite direction. For example machine code translation into the high-level language of C.

Last updated