CPU in a computer Central Processing Unit

 Memory or Storage Unit

Storage space for instructions, data, and preliminary results is provided by this component. This device transfers data to the other parts of the computer as required. It's also referred to as the main memory, an internal storage device, or random access memory (RAM).

Its capacity, power, and speed are all impacted by its size. Primary memory and secondary memory are the two main types of memories that the computer possesses. The memory unit's features are:

It retains all data and instructions about processing.

It saves processing-related interim findings.

Before these results are sent to an output device, it saves the processing's final outcomes.

All inputs and outputs are sent through the primary memory.

CPU in a computer Central Processing Unit

Central processing units (CPUs) have the following characteristic


  • The computer's brain is often referred to as the CPU.
  • The CPU performs a variety of activities related to data processing.
  • It saves data, commands, and consequences from intermediate phases (program).
  • It controls the operation of every part of the computer.

Control Unit

This device controls every part of the computer, but it doesn't really process any data.
These are this unit's functions:

  • It is in charge of regulating how data and instructions are sent between a computer's many components.

  • It manages and arranges every part of the computer.
  • It retrieves the instructions from the memory, decodes them, and controls how the machine should operate.
  • For the transfer of data or results from storage, it connects with input/output devices.
  • It doesn't store or process data.

ALU (Arithmetic Logic Unit)

There are two subsections in this unit:


  • Algebra Section
  • Section of logic

Arithmetic Section

In the arithmetic domain, operations including addition, subtraction, multiplication, and division are performed. The aforementioned operations are used repeatedly to complete all complicated processes.

Section of logic

The logic section's function is to apply logic operations, such as comparison, selection, matching, and merging, to the data.

The CPU, which houses all the hardware required to process input, store data, and output results, is the brain of a computer.
The CPU is continually executing computer programs that give it instructions on which data to process and in what order. We couldn't use a computer to run programs without a CPU.
For instance, a straightforward calculator software may command the CPU to add the two digits 2 and 2 and report the answerback.


The CPU can easily handle the instructions since it has a control unit that can comprehend program instructions and an Arithmetic Logic Unit (ALU) that can add integers. The CPU can process far more sophisticated programs than a basic calculator thanks to the control unit and ALU working together.

within the CPU

A CPU is an integrated circuit, usually referred to as a chip, at the hardware level. Millions or billions of tiny electrical components are "integrated" into an integrated circuit, which then organizes them into circuits and packs everything into a small space.

within the CPU

Some of those layers are real components, like transistors and chips, while others are abstractions, like gates and logic circuits.

Astonishingly, we can combine ostensibly straightforward components, like logic gates, to produce CPUs that drive sophisticated gadgets, such as our phones, laptops, and even self-driving cars.


How the CPU functions

Let's take a closer look at the CPU. Figure 2 represents a conceptual diagram of a fictitious CPU so that you may more readily understand its parts. Because they are not a component of the CPU and are simply displayed for clarity, the RAM and system clock are shaded. Additionally, there are no drawn-in connections between the CPU components and the control unit's clock. It suffices to explain that each component depends on the signals coming from the control unit and the clock.

Although the design may not appear to be very basic, it is actually far more complex. This number is enough for our needs without becoming unduly complicated.


unit for managing memory

The primary memory (RAM) and the CPU's data flow are controlled by the memory management unit (MMU). Additionally, it offers the memory protection necessary in multitasking situations and addresses translation between virtual and physical memory.

CPU timer and control module

For the CPU to function properly, each component must be synced. The control unit is in charge of guiding the activities of the other units via timing signals that go throughout the CPU at a pace set by the clock speed.

Accessible data storage (RAM)

Although it is depicted in this and the next diagrams as RAM or primary storage, the RAM is not actually a component of the CPU. Its purpose is to store data and programs so they are available for use when the CPU needs them.

What it does

CPUs operate on a cycle that is coordinated by the CPU clock and regulated by the control unit. This cycle, known as the CPU instruction cycle, is made up of many fetch/decode/execute steps. Accessed and entered into the instruction register is the instruction. It may include static data or references to variable data. Any data is decoded from the instruction and put into the A and B data registers. The A and B registers are used to carry out the command, while the accumulator receives the output. The instruction pointer's value is then increased by the preceding instruction's length, and the CPU starts over.

This is how a typical CPU instruction cycle looks.

a desire for speed

Even if the basic CPU functions fine, CPUs that employ this straightforward cycle can be used more effectively. We look at two of the many ways to increase CPU performance in this article.

accelerating the teaching cycle

Time wastage in the various CPU components was one issue early CPU designers ran against. Overlapping the sections of the CPU instruction cycle to better use the different components of the CPU was one of the first methods for enhancing performance.


For instance, the next instruction is fetched and put into the instruction register once the current one has been decoded. The memory address for the following instruction is then added to the instruction pointer as soon as that has happened. Figure 4 shows how overlapping instruction cycles are used.

Although this architecture appears to be seamless, waiting for I/O might impede the flow. When the necessary data or instructions aren't in the cache, the MMU must find them and transfer them to the CPU, which might take some time. Additionally, certain commands use much more CPU cycles than others, making it difficult to overlap data smoothly.

However, this is a potent technique for enhancing CPU performance.

last thoughts

To learn more about structures, we took a creative and streamlined look at a CPU. In this post, I just touched the surface of CPU capabilities. By clicking the embedded links for the subjects we covered, you may discover more.

Keep in mind that the descriptions and pictures on this page are hypothetical and do not depict any specific CPU

I'll examine RAM and disk drives as two separate forms of storage in the following installment of this series and explain why each is essential to contemporary computers.

Next Post Previous Post
No Comment
Add Comment
comment url