Programming language

Programming language

A programming language can be any artificial language that can be used to define a sequence of instructions for processing on a machine (industrial machinery, a computer, a tablet, a mobile)

It is generally assumed that the translation of the instructions into a code comprising the machine must be completely systematic. It is usually the machine that performs the translation

Low level language

At a very low level, microprocessors exclusively process binary electronic signals. Giving a microprocessor instruction actually involves sending series of a few and zeros spaced in time in a given way. This sequence of signals is called machine code

The code typically represents data and instructions for manipulating it. An easier way to understand machine code is by giving each statement a mnemonic, such as STORE, ADD, or JUMP. This abstraction results in the assembler, a very low-level language that is specific to each microprocessor

The low level languages allow you to create programs that are very fast, but difficult to understand. The most important thing is the fact that programs written in low level are practically specific to each processor. If you want to run the program on another machine with other technology, you will need to rewrite the program from scratch

High level language

Machines are generally thought to perform calculation or word processing tasks. The description above is just a very schematic way to see how they work. There is a high level of abstraction between what the machine is asked to do and what it really understands. There is also a complex relationship between high level languages and machine code

The high level languages are easier to understand than machine code because they are made up of elements of natural languages, such as English. In BASIC (one of the high-level languages best known for their simplicity of learning), commands such as 'IF COUNTER s 10 THEN STOP' can be used to ask the machine to stop if the COUNTER variable is equal to 10. Unfortunately for many people this way of working is a little frustrating, given that even though machines seem to understand natural language, they actually do so in a rigid and systematic way

Interpreters and compilers

Translating a series of assembly language statements (source code) into machine code (or object code) is not a very complicated process and is typically performed by a special program called a compiler. The translation of high level source code into machine code is also done with a compiler, in this case this program will be more complex, or by an interpreter

A compiler creates a list of machine code instructions, the object code, based on a source code. The resulting object code is an executable program that can already work on the machine, but that can cause it to crash if it is not well designed

The interpreters, on the other hand, they are slower than compilers because they do not produce an object code, but run through the source code one line at a time. Each line is translated into machine code and executed. When the line is read a second time, as in the case of programs where parts of the code are reused, it must be recompiled. Although this process is slower, it is less likely to cause unwanted locks on the machine