Definition of Source Code
Miscellanea / / November 13, 2021
By Guillem Alsina González, in Aug. 2016
If I tell you, dear reader, that 01100011010100111100, you can interpret that my keyboard is failing, that I have pressed some keys at random, that I want to play a joke or that I have simply lost my mind. However, this code can be understood by a computer, since these machines work with binary code.
As for us humans (even the most seasoned computer scientist) it is difficult to have a "conversation" exclusively in binary with a computer, intermediate ways of giving instructions to computers have been created that are more understandable than binary language by human beings humans.
One of these intermediate forms is the source code in which computer programs are written.
Programming languages
A language of programming is, in essence, a way of telling the computer what we want it to do, in a structured and understandable way. human (although to understand it fully it is necessary to study programming and language concepts in particular, such as when you want to learn a new tongue).
There are several programming languages, each one oriented to a specific task or audience.
The best known are:
- BASIC. Acronyms for Beginner's All-purpose Symbolic Instruction Code (Code symbolic General Purpose Beginner's Instruction Book), was invented in 1964 as a way to bring programming closer to the layman. Inextricably linked to the 8-bit computers that became popular in the 1980s of the 20th century, initially lacked a structured execution control, which was incorporated in later versions of the language.
- C. If BASIC is the most popular language, C is by far the most influential. Created in 1972 by Dennis Ritchie with portability between machines and different architectures in mind, it allowed to reprogram an embryonic UNIX system so that it could run on different computers. Even today it is used, in some variants, for cutting-edge applications in all fields.
- C ++. One of the aforementioned variants of C, perhaps the most influential. To the C language he adds the concepts of object orientation.
- Cobol. Unknown to the layman, he is well known among professionals. Created in 1959, the large number of solutions created in the industry with it (especially in the banking and finance sectors), have led to it still being used today, and its replacement becoming hard.
- PHP. Oriented to work with web pages.
- Java. Created by the defunct Sun Microsystems, its goal was to be truly universal, programming on a single machine and running on anyone. Although it only partially fulfilled this objective and carries a series of disadvantages, it is also still widely used.
- AssemblerContrary to the others on the list that are high-level languages, this one is low-level, being the one that is closest to the binary code of the machine although it is not exactly this. Its source code is very difficult for laymen to read.
Compilation: make it understandable to the computer
When we write a program in a programming language like those previously mentioned or others, we have what is called source code, which we can understand with a simple reading, but not the computer.
So that the latter can understand what we tell it in the source code and execute the pertinent instructions, we must carry out a process that will convert the source code into a file executable. This process is called compilation.
The compilation translates the source code into machine code.
By the way, about the code at the beginning of the article, although I have told you that maybe a computer could understand it, don't pay too much attention to me; it is simply an example that I have written at random, although the spirit is this: computers only "understand" zeros and ones.
Photos: iStock - George Manga / vgajic
Topics in Source Code