What is it and how does the CPU or processor?
Hello friends of this community, today I will talk about the cpu or processor as it seems to me that many people have doubts about what is or how it works.
The microprocessor is the little brain with which the computer counts and is basically responsible for receiving, analyzing and calculating all the data and this it does in several stages of execution which are:
- PreFetch: Executes pre-reading of the instruction to be carried out in the main memory.
- Fetch: Systematically order all the data in order to execute the necessary operations.
- Decoding: Decode the instructions so that you can logically separate the information and determine what to do.
- Execution: Carry out the necessary analysis and calculation process.
- Writing: Send the results to the main memory and record them.
What is a processor?
Although it can not be said that there is a single more important part inside a computer, since more than one is totally vital for its operation, the CPU or processor can be considered the cornerstone of these machines. And it is precisely this component is responsible for computing, ordering or processing, concepts that define computers or modern computers.
Currently it is complex pieces of technology developed with microscopic architectures, most of them come in the form of a single chip, quite small, hence they were given the name of microprocessors a few decades ago.
Currently the processors are in almost all the objects we use in our day to day, such as televisions, smartphones, microwave ovens, refrigerators, cars, sound equipment, and of course, personal computers. However, it was not always the small miracles of technology that they are now.
A little history:
There was a time when the processors were made up of huge contraptions that could fill a room. These first steps of computer engineering were mainly constituted by vacuum tubes, which although at the time were substantially more powerful than the alternatives formed by electromechanical relays, today the 4 MHz that at most they used to reach would seem like a laugh.
With the arrival of transistors in the 50s and 60s the CPUs began to become, in addition to smaller and more powerful, also much more reliable, since the machines formed by vacuum tubes tended to present an average failure every 8 hours.
However, when we talk about becoming smaller we do not mean that they fit in the palm of our hand. They simply went from being a room size to a refrigerator size. And those still large processors were made up of dozens of printed circuit boards that were connected together to give life to a single CPU.
After that came the invention of the integrated circuit, which basically joined everything in a single printed circuit board or wafer, which was the first step to achieve the modern microprocessor. The first integrated circuits were very basic, since they could only group a handful of transistors, but with the passage of time, and the exponential growth of the number of transistors that could be added in an integrated circuit, by the mid-sixties we already had the first complex processors constituted by a single wafer.
The first microprocessor as such would be introduced to the market as early as 1971, it was the Intel 4004, and since then everything else is history. With the rapid evolution of these small chips, and their great flexibility, they have completely monopolized the computer market, being that except for very specific applications that require very specialized hardware, they are the core of almost all types of modern computers.
How a CPU works
Simplifying to the extreme, and in didactic terms, the operation of a processor is given by four phases. These phases are not necessarily always separate, but as a general rule overlap, and always occur simultaneously but not necessarily for a specific function.
- During the first phase the processor is responsible for loading the code from memory. In other words, the data that should be processed later is read. In this first phase there is a common problem in the architecture of the processors, and that is that there is a maximum of data that can be read per period of time, and they are usually lower than those that can be processed, so there is a effect of bottle peak that currently is about solving by applying the multichannel and caches.
- In the second phase, the first stage of processing occurs as such. The information read in the first phase is analyzed following a set of instructions (next section of this article). Thus, within the data read there will be descriptive fractions for the set of instructions, which will indicate what should be done with the rest of the information. To put a practical example, there is code that indicates that the data of a package should be added with those of another package, each package being information that describes a number, with which a common arithmetic operation is obtained.
- Next comes the phase that continues with the frank processing, and is responsible for executing the instructions taken decoded within the second phase. In the previous example, this would be where the addition is made and the result is obtained.
- Finally, the process concludes with a writing phase, where again the information is loaded, only this time from the processor to the memory. In some cases the information can be loaded into the memory of the processor to be reused later, but once the particular work processing is finished, the data always ends up being written in the main memory, from where it can be written to the storage unit. or not, depending on the application.
Main modern architectures
As I said, the function of the processor is to interpret information. The data is loaded from the different memory systems in the form of binary code, and it is that code that must be a processor to be converted into useful data by the applications. The aforementioned interpretation is done through a set of instructions, which is what defines the architecture of the processor.
Currently, two RISC and CISC architectures are used. RISC gives life to the processors designed by the British firm ARM, which with the boom of mobile devices has seen significant growth. Also PowerPC, the architecture that gave life to Apple computers, servers and the Xbox 360 and PlayStation 3 consoles, is based on RISC. CISC is the architecture used in the X86 processors of Intel and X86-64 of AMD.
Regarding which architecture is better, it has always been said that because it is much cleaner and much better optimized, RISC would be the future of computing. However, Intel and AMD have never given a twist and have managed to create a very solid ecosystem around their processors, which although they are very contaminated with obsolete retrocompatibility elements, have always kept up with their rivals.
In general, for its flexibility and relative ease of production, for a few years more CPUs will remain the central pieces of modern computing. But always keep in mind that over the years have evolved technologies in parallel that help decentralize the load and today more than ever the graphic processors, more powerful but less flexible have begun to gain almost as much importance as the unit of central processing.