I am a professional laptop and computer troubleshooter, tech editor who loves to talk about technology and software. My passion is electronics devices. Follow me...Read more
Have you ever wondered how computers carry out heavy tasks such as searching the internet or computing data and giving results within milliseconds? If yes, you’d want to know more about the computer CPU.
You can think of the CPU as the brain of your computer. This part of your computer takes the instructions you give your computer and decodes them into a language your computer understands. It further executes the instructions and gives you the desired results.
Furthermore, all computations done on the computer are carried out and saved by the CPU. Since the CPU has several storage elements, one might ask where does CPU stores its computations? The answer to that question isn’t far-fetched; read on to find out.
What is a CPU?
Also known as the Central Processing Unit, the CPU is a component of your computer that processes all the tasks you input into a computer and yields corresponding results. You can think of the CPU as the brain and controller of your entire computer. However, if the CPU is dead, it may not perform these functions properly. To this effect, it is vital to understand how to tell if a CPU is dead.
The CPU’s capacity is usually measured in Gigahertz (GHz) or Hertz (Hz). This measurement represents how many tasks the chip can execute in a second. Furthermore, the CPU is subdivided into two main categories: single-core and multi-core processors.
This means that the single-core can execute only one set of tasks at any given time. The reverse is the case for multi-core processors.
Firstly, the CPU has a control unit that receives the instructions you send and breaks them down to a format that can be processed. This unit is followed closely by the Arithmetic Logic Unit (ALU), which carries out all numerical operations. The ALU is also responsible for arithmetic and logical operations in the CPU.
After that, the registers come up next. The registers are small bits of temporary memory that the ALU uses for data processing. Some of the different registers include program counters, current instruction registers, memory address registers, etc.
Where Does the CPU Store Its Computations?
To store computations, the computer central processing unit (CPU) uses registers. In a way, the register is similar to your computer’s RAM and cache. However, it has different functions and is much smaller and faster than them.
Also, the CPU registers are of different types and are useful for different tasks. For example, address registers store status registers for truth values, addresses, etc. While data registers, on the other hand, are responsible for storing numeric data.
To get a more detailed understanding of registers and the different types, let’s take a look at what follows below.
The registers are those parts of the CPU that is used to store computations alongside data that is being used at any instant. The CPU has different registers that are used to execute various tasks. Moreover, the types and number of registers a CPU has depend on its architecture. Also, note that some registers are more valuable than others.
How the Register Does Its Job
When you task your computer with a duty to carry out computations, it uses data retrieved from bigger memories. Such data is saved in the register for easy reach. Data stored in the computer memory stays there temporarily – it’s cleared when you initiate a new computation.
Types of Register
Let’s see the common types of registers and how they work:
- Data Registers: This register is responsible for storing data used for arithmetic operations. They are otherwise known as memory buffer registers and are used to keep data that will be needed for the next succeeding clock cycle.
- Address Registers: The address registers keep data addresses that allow the CPU to access it in the computer’s primary memory. Generally, this kind of register is known as a parallel load register and keeps the address to be manipulated next.
- Instruction Registers: This register helps the CPU keep the instruction that is being executed at any given moment. The CPU executes such instructions and prepares the next instruction simultaneously.
- Constant Registers: This register only stores read-only values (commonly 1s and 0s).
- Vector Registers: This register stores data used in vector processing.
- Status Registers: The status registers hold truth values that help decide whether to carry out an instruction.
- Program Counter: This register keeps track of the execution of programs by saving the address of the following instructions. As the name suggests, it also doubles as a counter of the number of operations the CPU carries out.
- Condition Code Register: This register helps the CPU to store the existing value of condition codes. Furthermore, the CCR has 5 flag bits set by the ALU. They can be Overflow (O), Carry (C), Negate (N), Zero (Z), and extend. These flag bits hold details of the just concluded operation.
Compared to a cache, a register is noticeably smaller and faster than even the smallest L1 cache. The small size and speed of the register make it suitable for holding partial results and some calculations.
A good example of what the register does is as follows: during multiplication, the register keeps the intermediate calculations and results. It holds such partial results until the processor arrives at the result of the multiplication. Without the registers, you’d have to wait for some more seconds for the processor to fetch the needed data from the RAM.
The cache memory is a semiconductor memory that is responsible for storing instances of data used frequently by the CPU. This helps the CPU to easily access data from the processor almost at the same instant. The cache memory is also located on the CPU chip.
The cache is subdivided into three levels, L1, L2, and L3. L1 is the smallest and fastest, followed by L2. L3is the largest and slowest of the three. The most common caches found in most recent CPUs are data cache, instruction cache, and Transaction Lookaside Buffer (LTB).
CPU and Storage
Your computer uses several memory components to help it start up and function properly. Your computer has internal and external memory. The internal memory can be thought of as memory components built into your computer. On the other hand, the external memory is used as support storage for the internal memory.
Computer internal memory
Also known as the primary memory of your computer, the internal memory is broken down into two types: the RAM and the ROM. These are further divided into smaller units which we’ll be discussing here.
Random Access Memory (RAM)
Your computer’s RAM can be referred to as the primary memory of the CPU. You even have the RAM component present in your mobile phones. It is used to store temporary data that the CPU between tasks can easily access.
To do this, it provides your computer apps with space to hold data that is actively in use. This allows for quick access to such data whenever it needs it during operations. The amount of RAM space available on your computer goes a long way in determining the speed and performance of your computer.
The RAM is further broken down into 2 smaller units. Moreover, these smaller units have different applications and capabilities. Let’s consider them below.
The dynamic random access memory, easily referred to as DRAM, is found in modern portable devices. Such devices include desktops, laptops, and gaming PCs. Of the two types of RAM, the SRAM is more affordable and also produces large-capacity memory.
This kind of RAM is also known as the Static Random Access Memory. The SRAM holds power for much longer than the DRAM, making it more expensive. As long as the computer, the SRAM can hold data stored on it.
Read-Only Memory (ROM)
This is another type of internal memory found on your computers (and mobile phones). Unlike your computer’s RAM, the ROM permanently stores data you save on it. As a result, it can be referred to as your computer’s non-volatile memory.
Since you can’t alter information saved on the ROM, it is mostly used for aspects of your computer, such as firmware instructions that are important for the proper functioning of your computer. Let’s have a look at the different types of ROM below.
Formally known as the Programmable Read-Only Memory, the PROM begins with no data saved. Using a special device known as a PROM programmer, you can write data onto the chip. Any data written on this chip stays permanent.
Programmers commonly use this ROM to create special firmware for a chip. This chip is then used to modify how a computer was initially designed to function.
This is fully known as Erasable Programmable Read-Only Memory. To write data on this chip, you also need a PROM programmer. EPROM is another kind of ROM that is different from the PROM chip. This allows users to erase the already written data and then reprogram the chip.
To erase data already written on the chip, programmers use UV (Ultraviolet) light from a quartz crystal window located at the upper part of the chip. Also, note that the chip can be destroyed due to excessive wiping of data, making it unreliable for further use. So, data on the EPROM can be erased only a specific number of times.
The Electrically Erasable Programmable Read-Only Memory, commonly abbreviated as EEPROM, is the last type of ROM. This chip allows you to save and erase any data on the chip conveniently.
Compared to EPROM, it is more convenient and efficient as you can erase data any number of times without destroying the chip. Furthermore, you can erase data on the chip without having to remove it from your computer.
Computer External Memory
The external memory is also known as your computer’s secondary memory. Your computer doesn’t need secondary memory to function properly. Also, external memory components of your computer can be attached or removed whenever you wish.
External memory includes flash drives, external hard drives, compact discs (CDs), and memory cards. Other rare types of this memory are optical, magnetic storage, solid-state, and virtual memory. Let’s take a brief look at how they function.
Optical drives are storage drives that read and store data using light. Some optical drives you may have come across include Blu-ray discs, DVDs, and CDs. This type of secondary memory is commonly used due to its ease of usage, and it’s also very cheap.
Magnetic Storage Devices
Magnetic storage devices encode data as an electric current on their magnetic coating. It uses a magnetic field to magnetize tiny segments of a metallic spinning disc to save data. Each segment represents a “0” or a “1” and contains large amounts of data (often several terabytes).
This type of storage is durable and affordable. Magnetic tapes, floppy disks, and hard disk drives are common types.
This form of external memory is composed of silicon microchips. They are faster and electrically save data using binary codes in silicon chips, commonly called cells. Common types of this memory include flash drives and USB memory sticks.
Virtual memory comes, built like a hard drive or solid-state drive. This type of secondary memory helps the computer to compensate for the inefficiency of physical memory. It transfers data from the RAM to a paging file on the disk storage when the RAM is out of memory. It transfers such data back as soon as there’s space on the RAM.
The computer has a CPU that can be seen as the engine room of all the operations carried out using the computer. However, the CPU cannot carry out its functions without memory. So, you probably asked: where does the CPU store its computations? The CPU stores computations on registers found in your computer. This is because registers are the smallest, and data saved on them can be quickly accessed.
I am a professional laptop and computer troubleshooter, tech editor who loves to talk about technology and software. My passion is electronics devices. Follow me on social media.More Posts