Introduction to Algorithms & Programming
Introduction to Algorithms & Programming
In order to be understood and executed by a computer, an algorithm must be translated into a language.
specific, which we call programming language. This results in what is called a
computer program that contains the entire set of consecutive actions that the computer
must execute. These actions are called instructions.
The language used by the computer's processor is called machine language. It is the only one.
language that the computer understands. A program in machine language is only
made up of a sequence of 0s and 1s (binary code), which is why it is difficult to
understand and write programs in this language.
Thus, it is more practical to create a program in a language that is more understandable.
the man and then translate it into machine language using a specialized program.
According to the translation method, compiled languages and interpreted languages are distinguished.
In the case of a compiled language (for example: C, C++, Pascal...), the program created,
called source program, is completely translated by what is called a compiler
before it can be executed by the computer. The compilation generates a so-called program
executable program.
This generated program is autonomous, meaning it does not need another program.
to execute. But with each modification of the source program, it will need to be recompiled.
to generate a new executable program that will take the changes into account.
In the case of an interpreted language (for example: Perl, Lisp, Prolog...), the source program
needs, for each execution, an auxiliary program called an interpreter that will read it
to translate and execute each instruction one by one. In this case, there is no
generation of executable program.