Unit - 4
Unit - 4
CPU stands for Central Processing Unit; it is also known as "the brain of the
computer". A CPU is a primary component of a computer that performs most of
the processing and controls the operation of all components running inside a
computer.
Components of CPU
Control Unit
As its name implies, a control unit acts as the "brain" of the CPU. A major role of a
control unit is to manage and execute instructions to perform the tasks specified
by a computer program. v. A CPU executes instructions by fetching them from
memory, decodes them, and then executes them. So, it plays a vital role in fetch-
decode-execute instructions.
The Arithmetic Logic Unit (ALU) is a component that has been extensively
optimised and engineered to do multiple tasks concurrently. It is commonly built
to execute operations speedily. It works in conjunction with other CPU
components, such as registers, memory, and control units, to execute complex
instructions.
Functions of an ALU
Memory Unit
A memory is a hardware component which is used to store and access the data
whenever required. Majorly; computer memory is categorised into two parts
Primary Memory (RAM) and Secondary Memory (Hard Disk). RAM is used for
short-term, fast data access and is essential for active program execution. On the
other hand, storage or secondary memory provides permanent data storage.
Hence, memory and storage units both are critical components of a computer
system.
Functions of memory
Primary Memory
Storage devices are used to store the data permanently, even when the
computer is powered off.
They are non-volatile; the data remains intact even when the power is
turned off or the system restarts.
Computer Registers
Registers are a type of computer memory used to quickly accept, store, and
transfer data and instructions that are being used immediately by the CPU. The
registers used by the CPU are often termed as Processor registers.
A processor register may hold an instruction, a storage address, or any data (such
as bit sequence or individual characters).
The most popular and commonly used storage devices are Hard disks (HDs),
Solid-State Drives (SSDs), USB flash drives, and optical disks (e.g., DVDs),
pen drives.
The data storage capacity of these devices in gigabytes (GB) to terabytes
(TB) and more, depending on the type and size of the storage device.
The following image shows the register and memory configuration for a basic
computer.
The Memory unit has a capacity of 4096 words, and each word contains 16
bits.
The Data Register (DR) contains 16 bits which hold the operand read from
the memory location.
The Memory Address Register (MAR) contains 12 bits which hold the
address for the memory location.
The Program Counter (PC) also contains 12 bits which hold the address of
the next instruction to be read from memory after the current instruction is
executed.
The Accumulator (AC) register is a general purpose processing register.
The instruction read from memory is placed in the Instruction register (IR).
The Temporary Register (TR) is used for holding the temporary data during
the processing.
The Input Registers (IR) holds the input characters given by the user.
The Output Registers (OR) holds the output after processing the input data.
Types of Register in Computer Organization
AC ( accumulator )
DR ( Data registers )
AR ( Address registers )
PC ( Program counter )
MDR ( Memory data registers )
IR ( index registers )
MBR ( Memory buffer registers )
These registers are utilized for playing out the different operations. When we
perform some operations, the CPU utilizes these registers to perform the
operations. When we provide input to the system for a certain operation, the
provided information or the input gets stored in the registers. Once the ALU
arithmetic and logical unit process the output, the processed data is again
provided to us by the registers.
The sole reason for having a register is the quick recovery of information that the
CPU will later process. The CPU can use RAM over the hard disk to retrieve the
memory, which is comparatively a much faster option, but the speed retrieved
from RAM is still not enough. Therefore, we have catch memory, which is faster
than registers. These registers work with CPU memory like catch and RAM to
complete the task quickly.