Website uses cookies. Cookies remember your actions and preferences for a better online experience. We don`t share information with third parties without your knowledge.
On the pages of the BizUPLab IT company blog we have repeatedly talked about different programming languages. In this publication we will talk about how, in fact, computers understand what the developer writes using code.
Any computer has one component without which its operation would be simply impossible. This is the processor. Despite the fact that modern processors are quite complex, the basic operating principle is quite primitive. All that the processor can do is execute simple commands known to it: add, subtract, multiply, move, and so on. Therefore, we can assume that the execution of any program comes down to the processor performing simple operations. This sequence of actions is needed to process some data. But what is data in a computer anyway? This is everything that a computer can interact with: numbers, text, music, video, etc. Data is stored in a computer in binary code, and this is the only way it can work with it.

How Computers Understand Programs

A program is a sequence of commands that processes some data. What is interesting is that the program itself is stored in the same memory as the data, and in the same form. At first glance, this is the same sequence of zeros and ones, and it does not even differ from the data. The English mathematician Alan Turing came to this idea back in 1938. We can imagine that the computer perceives both numbers and operations as a set of zeros and ones. In this case, for example, numbers are represented in the binary system, and processor commands are in special machine codes. Having received a command in machine code, the processor can decipher it and understand what operation needs to be performed and on what data. Thus, by a program we can understand a sequence of processor instructions, the execution of which one after another will lead us to solving the required problem.

Therefore, the computer performs the following sequence of actions:
  1. Reads the instruction and understands what it needs to do.
  2. Reads data from memory if the instruction involves working with them.
  3. Executes this command.
  4. Writes the result back to memory.

Data entry

At first, command codes and data were entered into memory manually using special switches, later the process was improved with punched tapes, but nevertheless this did not make the work much easier and was not at all similar to the modern writing process. The programmer had to first determine what sequence of commands the program would consist of, then how to punch these commands on the punched tape, and only then load them into the computer's memory. At the same time, the command codes for different processors could differ significantly, noted the managers of BizUPLab Hungary. Just imagine: you start using a new processor model - and all the old programs need to be rewritten.

Processor and programs

A revolution occurred in the late 1940s with the advent of the assembler language. In fact, programs written in this language were the same machine instructions, but in a form that a person could read. At the same time, assembler compilers appeared. These are programs that read the code written by the programmer and convert it into machine instructions. Despite the fact that this process was much more convenient for the programmer, it was still very similar to writing programs directly in machine instructions.

Of course, programmers dreamed of the emergence of programming languages ​​that would be oriented directly to them, and not to computers. This led to the emergence of high-level programming languages. With their help, it was possible to write programs that are almost independent of the instructions of a specific processor. These programming languages ​​allow programmers to focus on the logic of the program, and not on its implementation as a set of simple operations.

The conversion of programs written in high-level languages ​​into machine instructions is also performed by a compiler. Moreover, the compiler needs to know for which processor model it generates instructions. After all, the same program in a high-level language can be converted into a different set of machine instructions. Thus, programs acquired an important property - portability. It was no longer necessary to re-write programs for each specific processor, it was enough to just compile. Today, all this may seem obvious and simple, but such an evolution took decades, and it is still ongoing, noted the developers of BizUPLab kft.

Revolution

We help business people manage their resources efficiently and systematically achieve success.
1114 Budapest, Bartók Béla út 66. 3. em. 4.

info@bizuplab.com
Contact Info
Copyright © BizUPLab, 2023 - 2025