0% found this document useful (0 votes)
7 views7 pages

Unit - 4

The Central Processing Unit (CPU) is the primary component of a computer that performs processing and controls all operations. It consists of several components including the Control Unit (CU), Arithmetic Logic Unit (ALU), memory, and registers, each with specific functions such as instruction fetching, execution, and data storage. The CPU is essential for executing instructions by fetching, decoding, and executing them, thereby directing the overall operation of the computer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views7 pages

Unit - 4

The Central Processing Unit (CPU) is the primary component of a computer that performs processing and controls all operations. It consists of several components including the Control Unit (CU), Arithmetic Logic Unit (ALU), memory, and registers, each with specific functions such as instruction fetching, execution, and data storage. The CPU is essential for executing instructions by fetching, decoding, and executing them, thereby directing the overall operation of the computer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Central Processing Unit

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 (CU)


 ALU (Arithmetic Logic Unit)
 Memory or Storage Unit
 Registers

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.

Functions of Control Unit

 Instruction Fetch − A CU fetches instructions from RAM (Random Access


Memory).
 Instruction Decoding − It decodes the fetched instructions to operate.
 Instruction Execution − A CU sends control signals to perform operations
like ALU for arithmetic and logical operations.
 Control Flow Management − It controls flow by updating the programme
counter.
 Exception Handling − A control unit effectively manages exceptions and
interruptions like hardware failures, system calls, and external events, by
appropriately diverting the control flow of the CPU to the planned
procedure for managing such exceptions.
 Synchronization − A CU plays a crucial role in facilitating the coordination
of instruction execution across several cores.

Arithmetic Logic Unit (ALU)

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

 Arithmetic Operations − The ALU can perform basic arithmetic operations.


 Logic Operations − The ALU can also perform logical operations like AND,
OR, NOT, XOR, and bit-shifting operations.

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

 RAM is also known as primary or temporary memory; it is a type of volatile


memory used for temporarily storing data.
 The contents inside the RAM are erased when the computer’s power gets
off or restarted.

 RAM is actively used for program or instruction execution.


 Once we start the computer; system necessary files, programs and
operating system files are loaded into the RAM for the smooth running of
the computer.
 The more RAM a computer has, the better it can handle multitasking and
the faster it can run applications since data can be accessed more quickly.

Storage (Hard Drives, SSDs, Flash Drives, etc.)

 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.

Functions of the CPU

The key functions of a CPU are as follows −

 The CPU performs arithmetic and logic operations.


 It directs the operation of the processor.
 It directs Input and output units that how to respond to the instructions
that have been communicated to the processor.
 A CPU contains registers which are considered small storage locations
within the CPU to hold data temporarily during execution of a program.
 A CPU executes instructions by fetching them from memory, decodes them,
and then executes them.
Following is the list of some of the most common registers used in a basic
computer:
Register Symbol Number of bits Function

Data register DR 16 Holds memory operand

Address register AR 12 Holds address for the memory

Accumulator AC 16 Processor register

Instruction register IR 16 Holds instruction code

Program counter PC 12 Holds address of the instruction

Temporary register TR 16 Holds temporary data

Input register INPR 8 Carries input character

Output register OUTR 8 Carries output character

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

In Computer Organization, the register is utilized to acknowledge, store, move


information and directions that are being utilized quickly by the CPU. There are
different kinds of registers utilized for different reasons. Some of the commonly
used registers are:

 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.

You might also like