What’s inside a Computer? CPU, Memory &..


TABLE OF CONTENT
Basic Components inside a Computer
The Arithmetic and Logical Unit(ALU)
The Control Unit(CU)
Computer Storage

We will discuss about what is inside a computer, basic components of a computer like Memory Units and Computer Storage.

Many of us have heard of Snow White’s iconic fairy story. There was a magic mirror, whom the Queen often asked, “Who is the fairest in the land?”

Magic Mirror and The Queen

The Magic Mirror honestly replied each time with its vital intelligence. The Magic Mirror is computer-like! It listens to the Queen’s query, reaches into its Store of Information, and instantly answers her. The computer can ‘listen’ to its owner in the same manner in the following order. This is the so-called providing of Input.

Input Devices

Users can provide Input to the device in several ways. We can do this either by typing them on a keyboard, using a mouse to click something on the screen, talking through a microphone, and some other ways.

Devices from which we can send instructions or communicate with the computer are called Input Devices.

Notice, The Magic mirror even spoke back to the Queen in the story. The computer will do so using its speakers and other sorts, such as displays and printers. But it typically shows the ‘response’ or results back to us by showing it on the screen or by executing the command given to it. This is called the Output of the computer.

Output from Printer

Devices that are used to communicate outcomes with the user are considered Output Devices. In between Input and Output, there is the main stage called processing. This is where the miracle occurs!

Processing is carried out in the Central Processing Unit or the CPU. The CPU uses the instructions given to it by the user and the instructions stored in the memory to provide the Output. We might assume that, in a computer’s operation, the CPU and the memory units make up the processing step.

INPUT -> PROCESS -> OUTPUT

BASIC COMPONENTS INSIDE A COMPUTER

Components of the Processing Phase looks something like this:

CPU Core Components

The CPU is the computer’s crucial element that does calculations, functions, and runs programs. It’s considered the Cortex of the Computer.

The circuitry inside a computer that controls data manipulation is called the central processing unit or CPU, or only a processor or even a microprocessor.

Usually, the CPUs used in today’s desktops, notebooks, and tablets are tiny flat squares that link the motherboard to the device’s main circuit board. Usually, these CPUs are 1 to 2 inches or 25 to 50 millimeters in height.

Processor of a mobile

These CPUs are around half their size in smartphones and other lightweight wearables. Several famous businesses that manufacture these CPUs are Intel & AMD.

The CPU consists of the Control Unit (CU), the Memory Unit, and the Arithmetic and Logical Unit (ALU).

The ALU performs all of the computer’s calculations and logical operations, handling numbers in a structured and purposeful manner.

Computers understand instructions in 0s and 1s combinations. The Arithmetic and Logical Unit is essential because everything is expressed in numbers.

Control Unit is responsible for a lot of operations.

  • The Control Unit directs the Processor’s operations and monitors it.
  • It regularly interacts with the Arithmetic & Logical Unit, the memory, and the input/output device, asking them what to do.
  • The Control Unit reads instructions and interprets them.
  • It controls information flow from various computer devices and regulates the timing of the Processor’s working.
  • It manages various fetching tasks, encoding, executing, and storing outcomes necessary for the system to operate.

In a computer, primary memory and secondary memory are two types of memory.

  • Secondary storage is the device where all data and commands from the device are stored. This is a permanent memory that includes data and programs. It can be rewritten.
  • Another memory is ROM (Read Only Memory), where vital machine startup instructions and other critical functions are stored. It cannot be rewritten.
  • Anything needed for immediate use is copied from the ROM and Storage and stored in the memory portion. This memory is temporary and is referred to as RAM (Random Access Memory).

So, the primary memories are RAM & ROM.

To understand a computer’s operation more straightforwardly, let’s look at an example.

Let’s take a few minutes to retrace the steps when you have turned your attention to your device and opened this article by clicking on the link. What was just a touch or a button for you meant a whole lot more to your machine or your cell phone!

Your work was done when you clicked on the link. Your device has taken over from there.

  • The machine’s input system has detected a click and sent the information to the Processor along with the click position.
  • Processor used the memory to check which part of the program is represented by that specific link within that particular portion of the screen.
  • The article’s title was then discovered and loaded into the temporary memory by importing chunks of data from the internet.
  • Post that it read and interpreted the code for this browser on which you are reading this article.
  • Then, it followed the instructions to display the article, photos, and text on your screen to represent the post that’s been opened.

Within a few seconds, all of this happened on the great device that is your laptop or cell phone.

The brain(some call it the heart) of the computer is the CPU, and as we know, it consists of the ALU and the CU. All the processing takes place using a combination of these components and memory.

The Arithmetic and Logical Unit(ALU)

Let’s begin with the Section of Arithmetic and Logical Unit. It is the computer’s mathematical brain. It is composed of 2 parts—the Arithmetic Segment and the Logical Segment.

Each segment includes complex electrical circuits based on arithmetic operations such as combining, subtracting, multiplication, splitting, and logical operations such as AND, OR, NOT, XOR.

The right circuit is used to operate as per the direction of the Control Unit. The ALU looks something like this overall:

Arithmatic and Logical Unit
  • A and B are the criteria on which the tasks are to be carried out. Y represents the location generated to store the outcome of the process in the memory.
  • The A and B values are sent to ALU from memory with data on which operation will be done.
  • The ALU approves A and B, the instruction is executed, and the answer is saved in Y. This response will now be exchanged with the user using the computer’s output devices.

The Control Unit(CU)

The Control Unit(CU) is the next one. The control unit’s role is to make sure that all the components carry out the proper operations. The CU reads the instructions and comprehends them.

To do the actual processing, it then sends inputs and instructions to the various other components.

Instructions can be accessed from the secondary memory or can come from the user directly. This is sequentially loaded into the primary memory.

Control Unit Diagram

Each instruction line is first decoded from here, and then the execution begins. Directions are provided to the computer’s processor components.

It is easy to discuss how the CPU operates, but it’s very sophisticated process inside a computer.

Example

Let’s assume we have an app that needs to give us Input, two numbers, add both numbers together, and generate the outcome. It seems relatively straightforward. Add 2+5, which results in 7. The app’s commands must be within the Processor.

Step No.CPU Component in Action Actions Performed by CPU Components
1Control Unit, RegisterUse the bus to get one of the values from memory to be added and put it in a register (2)
2Control Unit, RegisterUse the bus to get the other memory value to be inserted and put it in another register (5)
3Control Unit & the Arithmetic/ Logic Unit, RegisterTrigger the circuitry addition with the registers used as inputs in Steps 1 and 2 and another register assigned to keep the result(2 + 5 = 7)
4Control Unit, RegisterStore the result in memory(7), using the bus
5Control UnitStop the Action

The app owner inserts the two numbers 2 and 5 located in the computer’s main memory. The procedure for executing this addition process, looking at this table on the screen, begins with the control unit of the CPU, transferring a copy of the data from memory through a bus, which is a set of wires that connect the CPU to the main memory and temporarily store them in two registers, memory within the CPU.

The control unit then triggers the arithmetic logic unit’s circuitry to do the addition, putting the Output, 7, in another register. Then, via the bus, the control unit brings a copy of the result back into memory.

The CPU’s control unit is probably the most advanced CPU component since it must do all these steps in precise order and timing.

Clock Speed

Clock Speed

You may have heard about the CPU clock speed. The clock speed determines the timing of whatever the control unit does at each of its actions.

The CPU is merely an impressive piece of technology. To keep up with all of our demands, the CPU continues to grow to get much more robust and quicker, requiring that the computer do so much more for us than it used to do only a few years before.

Computer Storage

Memory, also referred to as RAM, is commonly used to keep software programs and apps and their related data briefly before the power is switched off. Storage is the word that defines the long-term retention of programs and applications for software and their associated data even though the machine or system is switched off.

We can think of memory and storage in the same way as our human brain. The distinction is that memory is all our brain has lost, while storage is all we can recall and things like walking and speaking.

Inside a Hard Disk Drive

The CPU is a great and exciting device. It’s impossible to talk about the CPU without worrying about memory and maybe even storage. Typical CPU duration involves memory interaction, also referred to as Main Memory.

So, what’s the Main(Primary) Memory?

Think of 8 gigabytes of memory, for example, mostly seen on individual desktops, laptops, or tablets. This form of memory is volatile, meaning that memory loses all data and software programs and apps stored temporarily in it when power is switched off.

This is separate from the gigabytes of memory found on a smartphone or the gigabytes of memory used for storage. This memory’s storage type is non-volatile, ensuring that the files and software programs, and applications stay within this type of memory until the power is switched off.

Solid State Drives

A few examples of this non-volatile memory used overtime to preserve records, software programs, and apps are Hard Disc Drives(HDDs), Memory Sticks, and Solid-State Drives(SSDs). These devices are designed to store files, software programs, and applications in massive numbers of gigabytes or even terabytes.

Secondary Storage

The computer has a component called storage to store records, programs, and files.

RAM

This information is searched for and pulled from the permanent storage as required. It is reproduced inside the RAM, the temporary storage (Memory).

Every sequential instruction is loaded from here into the Control Unit, which then executes it.

ROM

There is a memory segment called the ROM. It is a permanent memory with essential instructions. For execution, these too are loaded into the temporary memory.

Different forms of ROM are present. Some are hard-wired and can not be modified, such as the MROM or Masked ROM. Others can be modified once or many times, such as the Programmable ROM (PROM), Erasable and Programmable ROM (EPROM), and the Electrically Erasable and Programmable ROM (EEPROM).

Registers

There is another type of small memory in the computer, also known as a Register.

The CPU comprises several registers as a whole to:

  1. Fetch: Fetch and post data from one element, such as the memory, to another element, such as the CU.
  2. Decode: Instructions to Read.
  3. Execute: The execution of a register typically serves to store and transfer CPU operations outcomes.
Registers are like Minions

We may think of registers as little helpers or as little minions who do small but essential work.


Conclusion

That’s why to carry out every operation, a computer needs to know and understand different things.

1. Secondary storage of programs, documents, and files, typically in the form of a disc drive

2. Primary storage, including RAM and registers, or volatile storage.

3. The ROM consists of permanent, basic instructions that may be used from time to time.

You may like to Explore –

Top 9 Emerging Technology Trends For this year

What JavaScript Framework should you learn? Is it useful?

Cheers!

Happy Coding.

About the Author

This article was authored by Rawnak.

Comments are closed.