Logo of Computer Classes

Everything basic and common to all programming languages that you should know

It is the first thing that you will have to learn even before choosing the program with which you want to program.

The first thing you have to know is that the computer is an electrical machine and only understands the so-called binary code (1 and 0).

1 = current

0 = No current

This is their language.

Understanding ourselves with it through this code is very difficult, that is why programming languages are divided into two different types depending on their proximity to the language of the computer.

The computer code is based on assigning to each character (letter, sign, number, etc.) a combination of 8 zeros and ones (8 bits = byte) by means of a code called ASCII.

For example the letter A is represented by the following combination: 01100001.

The languages closest to the language of the computer, called low-level, are very complicated (almost like computer code) and little used.

The best known is the code or machine language, a code that the computer can interpret directly.

Here's an example:

8B542408 83FA0077 06B80000 0000C383

We are not going to talk about this type of language, which is usually only used by those who program computers for their use.

We will talk about knowledge common to high-level languages.

High-level programming languages ​​allow you to give commands to the computer with a language similar to ours (Visual Basic, Pascal, Logo, C ++, JavaScript, etc.) and always or almost always in English.

There are high-level programs such as GML or Java that are interpreted programs, that is, the instructions are analyzed and executed by the program itself directly.

Others need a compiler, but that is not a problem, it is only a program (software) that is responsible for translating the program made in programming language into the computer code so that it can be understood.

With one type or another it is the same, the important thing is that languages, like everything else, must be learned, but they have an advantage, and that is that they have many points in common.

These points are what we are going to study here, the fundamentals of programming common to any high-level language.

Once you have learned the basics, you will have to choose the language you want to use, but with this knowledge, they will all be very easy to learn, you will only have to learn a few instructions in English.

Here we leave you a link with the most common languages ​​and what they are used for. It can serve as a guide for choosing the language you want to learn.

Programs and Algorithms

Programming languages all have a set of "instructions" to their credit.

An instruction is nothing more than an order that we give to the machine.

And, after all, a program is nothing more than a sequence of instructions (written in some programming language) designed to solve some kind of problem.

It must be clear that if we do not know how to solve this problem, we will not be able to write the program.

If we don't know what a sum is, it would be almost impossible to make a program to add two numbers to us, unless someone helped us.

You can think of one way to solve it, your partner another, the important thing is that the two ways of solving it lead to the same result, the sum.

The way you solve the problem is what is called an algorithm, and it is what we are going to see next.

What is an Algorithm?

An algorithm is a sequence of STEPS to follow to solve a problem.

For example, when I want to watch a video movie, I could do the following steps (algorithm):

- I choose a movie from my collection.

-I check if TV and video are connected to the network (and I proceed).

-IF the TV is off, I turn it on, IF NO, then no. And the same with the video.

-I put the film in the video. I put the case on the video.

-IF the TV is not on the correct channel, I will change it, IF NO, then no.

-I take the remote controls (the one for the TV and the one for the video).

-I make myself comfortable.

-Press PLAY on the video controller.

Take a good look at some details that are fundamental and that appear in this algorithm:

- The description of each step does not lead me to ambiguity, the steps are absolutely explicit and not misleading.

- The number of steps is finite. They have a beginning and an end. As seen, a better algorithm definition would be:

"An algorithm is a finite sequence of unambiguous steps (not instructions as in programs) that can be carried out in finite time."

This "language" algorithm is written in our language, but now we need to get a little closer to the language of the computer.

But the first step to make a program is to get its algorithm, it is how to explain what we want our program to do.

Now you understand why we said before that if we do not know how to solve the problem, we could not create the program. We would not be able to do your algorithm.

Now that we have the algorithm, for the next step you can use two ways: Take the Flow Diagram of the algorithm or its pseudocode.

Some programmers do both.

Date update on 2021-03-31. Date published on 2021-03-31. Category: Computer class Author: Oscar olg Fuente: areatecnologia