Programming Language. REHEARSAL
Programming Language. REHEARSAL
INTRODUCTION
Computers do not speak our language, they are machines and as such,
they need a specific language designed by man for them. Additionally,
they constantly need to interpret all the instructions they receive. Given
the insurmountable difficulty of communication between the computer
and the programmer, programming languages soon appeared that make
communication with the microprocessor possible, using terms and
symbols related to the type of problem that must be solved, through the
use of tools provided by the computing.
These languages allow, on the one hand, to write the operations that are
necessary to solve the problem in a way similar to how it would be written
conventionally (that is, to properly write the algorithm for solving the
problem) and, on the other, they are responsible for translate the
algorithm into machine language (a process known as compilation) which
gives the program the ability to run (be executed) on the computer. The
computer is actually just a virtual machine, capable of solving all the
problems that users are capable of expressing through an algorithm
(program).
Currently there are many types of programming languages, each with its
own grammar, special terminology and particular syntax. For example,
there are some created especially for scientific or general mathematical
applications (BASIC, FORTRAN, PASCAL, etc.); others, however, are
oriented towards the business field and the management of texts and
files, that is, they are actually fundamentally information managers
(COBOL, PL/1, etc.), or closely related to computer machine language
(such as the C and the ASSEMBLER).
Computers were programmed in machine language but the difficulties
that this entailed, together with the enormous ease of making errors,
whose location was long and complex, led to the possibility of using
symbolic languages in the 1940s. The first to appear were the
assemblers, which basically consisted of giving a name (mnemonic) to
each type of instruction and each address (label). At first I used the
program on paper and then it was translated by hand with the help of
some tables, and entered into the machine in numerical form, but soon
programs appeared that were assembled automatically.
DEFINITIONS
2nd Set of “linguistic” rules (words and symbols) that allow a program to
be written and for it to be understood by the computer and can be
transferred to similar computers for operation in other systems.
MACHINE LANGUAGE:
Machine language is the only one that the computer understands directly,
since it is written in languages directly intelligible by the machine
(computer), it uses the binary alphabet, which consists of the only two
symbols 0 and 1, called bits (English abbreviation for digits). binary). Its
instructions are binary strings (strings or series of characters of digits 0
and 1) that specify an operation and the memory locations (address)
involved in the operation are called machine instructions or machine
code. It was the first language used in computer programming, but it was
no longer used due to its difficulty and complexity, being replaced by
other languages that were easier to learn and use, which also reduced
the possibility of making errors. Machine language is the well-known
binary code. Generally, the hexadecimal system was used in program
coding to simplify the writing work. All instructions prepared in any
machine language have at least two parts. The first is the command or
operation, which tells the computers what function it is going to perform.
All computers have an operation code for each function. The second part
of the instruction is the operand, which tells the computer where to find
or store the data and other instructions that are going to be manipulated,
the number of operands of an instruction varies in different computers.
They are easier to use than machine languages, but like them, they
depend on the particular machine. The low-level language par excellence
is assembly. Assembly language is the first attempt to replace machine
language with another language more similar to those used by people.
This attempts to make the representation of the different fields more
flexible. This flexibility is achieved by not writing the fields in binary and
by bringing writing closer to language. In the early 1950s, in order to
facilitate the work of programmers, mnemonic codes were developed for
symbolic operations and addresses. Mnemonic codes are the
alphabetical symbols of machine language. The computer still uses
machine language to process data, but assembly programs first translate
the specified opcode symbols into their machine language equivalents.
Currently, programmers do not assign actual address numbers to
symbolic data, they simply specify where they want the first location of
the program to be placed and the assembler program takes care of the
rest, assigning locations for both the instructions and the data. These
assembly programs also allow the computer to convert the programmer's
assembly language instructions into its own machine code. A program of
instructions written in assembly language by a programmer is called a
source program. After the assembler converts the source program into
machine code, it is called an object program. It is easier for programmers
to write instructions in assembly language than in machine language
code, but two computer runs may be required before the source program
instructions can be used to produce the desired outputs.
Low-level languages allow you to create very fast programs, but they are
often difficult to learn. More important is the fact that programs written
at a low level are highly processor-specific. If you take the program to
another machine, you must rewrite the program from the beginning.
These languages are the most used by programmers. They are designed
to make it much easier for people to write and understand programs than
machine and assembly languages. A program written in a high-level
language is machine independent (the instructions do not depend on the
hardware design or a particular computer), so these programs are
portable or transportable. Programs written in a high-level language can
be run with little or no modification on different types of computers. They
are programming languages in which the instructions sent for the
computer to execute certain commands are similar to human language.
Since the computer is not capable of recognizing these commands, it is
necessary to use an interpreter to translate the high-level language into a
low-level language that the system can understand.
Computers are generally thought of as machines that perform calculation
or word processing tasks. The above description is just a very schematic
way of looking at a computer. There is a high level of abstraction between
what is asked of the computer and what it actually understands. There is
also a complex relationship between high-level languages and machine
code.
High-level languages are usually easy to learn because they are made
up of elements of natural languages, such as English. In BASIC, the
most popular high-level language, commands such as “IF COUNT=10
THEN STOP” can be used to ask the computer to stop if COUNT is equal
to ten. Unfortunately for many people this way of working is a bit
frustrating, given that although computers seem to understand natural
language, they actually do so in a rigid and systematic way.
Achieve independence from the machine, being able to use the same
program on different computers with the only condition of having a
translator or compiler program, which is supplied by the manufacturer, to
obtain the executable program in binary language for the machine in
question. Additionally, you do not need to know the specific hardware of
said machine. Approach natural language, so that the program can be
written and read in a simpler way, eliminating many of the possibilities of
making errors that occurred in machine language, since words (in
English) are used instead of strings. symbols without any apparent
meaning.
It can be said that the main problem that high-level languages present is
the large number of them that currently exist in use, in addition to the
different versions or dialects that have been developed for some of them.
It is difficult to establish a general classification of them, since in any that
is carried out there will be languages that belong to more than one of the
established groups. A very widespread classification, based on the way
the programs work and the philosophy with which they were conceived, is
the following:
The first manual for the Fortran language appeared in October 1956 ,
with the first Fortran compiler delivered in April 1957 . This was an
optimized compiler, because customers were reluctant to use a high-level
language unless their compiler could generate code whose performance
was comparable to that of hand-written assembly language code.