Unit:2
The Computer System Hardware
Prepared by
Er. Binod Kumar Rajbhar
11/27/2024 Er. Binod Rajbhar 1
Introduction
A computer system consists of three main
components.
• Input/output unit
• Central processing unit
• Memory unit
11/27/2024 Er. Binod Rajbhar 2
Central Processing Unit (CPU):
• The computer system is nothing without the
Central processing Unit so, it is also known as
the brain or heat of computer.
• The CPU is an electronic hardware device
which can perform different types of
operations such as arithmetic and logical
operation.
• CPU consists of arithmetic logic unit(ALU),
control unit(CU) and Registers.
11/27/2024 Er. Binod Rajbhar 3
Functions of CPU
Reads instructions from memory.
Communicate with all peripherals(memory
and I/O devices) using the system bus.
It controls the sequence of instructions.
It controls the flow of data from one
component to another component.
Performs the computing tasks specified in
program.
11/27/2024 Er. Binod Rajbhar 4
CPU
11/27/2024 Er. Binod Rajbhar 5
Arithmetic Logic Unit (ALU)
This is the area of CPU where various computing
functions are performed on data.
It consist of two units: Arithmetic unit and logic
unit.
Arithmetic unit preforms arithmetic operations
such as addition, subtraction, multiplication and
division.
Logic unit performs comparisons of numbers,
letters and special characters.
Logic operations include testing for greater than,
less than or equal to condition.
11/27/2024 Er. Binod Rajbhar 6
Control Unit:
• The control unit provides the necessary timing
and controls signals to all the operations in the
computer.
• It acts as a supervisor and controls and
coordinates the activity of the other units of
computer.
• It controls the flow of data between the CPU and
memory and peripherals.
• It also controls entire operations of computers.
11/27/2024 Er. Binod Rajbhar 7
Functions of controls units:
It directs the flow of data sequence between the processor and
other devices.
It can interpret the instructions and controls the flow of data in the
processor.
It generates the sequence of control signals from the received
instructions or commands from the instruction register.
It has the responsibility to control the execution units such as ALU,
data buffers, and registers in the CPU of a computer.
It has the ability to fetch, decode, handle the execution, and store
results.
It cannot process and store the data.
To transfer the data, it communicates with the input and output
devices and controls all the units of the computer.
11/27/2024 Er. Binod Rajbhar 8
Registers
Registers are the high speed temporary storage
locations in the CPU made from electronic
devices such as transistors, flip-flops etc.
These are the high speed area with the CPU but
have the least storage capacity.
Registers are primarily used to store data
temporarily during the execution of program and
are accessible to the user through the
instructions.
11/27/2024 Er. Binod Rajbhar 9
The data and instructions that require
processing must be brought in the registers of
CPU before they can be processed.
Some of the important registers in CPU are as
follows:
Accumulator: it contains the results of
arithmetic and logic operations.
Instruction Registers(IR): it stores the current
instruction most recently fetched.
11/27/2024 Er. Binod Rajbhar 10
• Memory Address Register(MAR): it stores the
address of next location in the memory to be
accessed.
• Program counter(PC): it stores the address of
next instruction to be processed.
• Data Register(DR): it stores the operands and
any other data.
• Memory Buffer Register(MBR): it temporarily
stores data from memory or the data to be
sent to memory.
11/27/2024 Er. Binod Rajbhar 11
Memory Unit
The memory unit consist of cache memory and
primary memory.
Primary memory or main memory of the
computer is used to store the data and
instructions during execution of the instructions.
Primary memory is of two kinds: RAM and ROM
Secondary memory is non-volatile and is used for
permanent storage of data and programs.
A program or data that has to be executed is
brought into the RAM from the secondary
memory.
11/27/2024 Er. Binod Rajbhar 12
Cache Memory
It is a small-sized chip-based computer memory
that lies between the CPU and the main memory.
It is a faster, high performance and temporary
memory to enhance the performance of the CPU.
It stores all the data and instructions that are
often used by computer CPUs.
It also reduces the access time of data from the
main memory.
It is faster than the main memory, and
sometimes, it is also called CPU memory because
it is very close to the CPU chip.
11/27/2024 Er. Binod Rajbhar 13
The following are the levels of cache
memory.
1. L1 Cache: The L1 cache is also known as the
onboard, internal, or primary cache. It is built with
the help of the CPU. Its speed is very high, and the
size of the L1 cache varies from 8 KB to 128 KB.
2. L2 Cache: It is also known as external or secondary
cache, which requires fast access time to store
temporary data. It is built into a separate chip in a
motherboard, not built into the CPU like the L1 level.
The size of the L2 cache may be 128 KB to 1 MB.
3. L3 Cache: L3 cache levels are generally used with
high performance and capacity of the computer. It is
built into a motherboard. Its speed is very slow, and
the maximum size up to 8 MB.
11/27/2024 Er. Binod Rajbhar 14
Advantages of Cache Memory:
1. Cache memory is the faster memory as compared
to the main memory.
2. It stores all data and instructions that are
repeatedly used by the CPU for improving the
performance of a computer.
3. The access time of data is less than the main
memory.
Disadvantage of Cache Memory:
1. It is very costly as compared to the Main memory
and the Secondary memory.
2. It has limited storage capacity.
11/27/2024 Er. Binod Rajbhar 15
Primary or Main Memory
Primary memory is also known as the computer system's
main memory that communicates directly within the CPU,
Auxiliary memory and the Cache memory.
Main memory is used to kept programs or data when the
processor is active to use them.
When a program or data is activated to execute, the
processor first loads instructions or programs from
secondary memory into main memory, and then the
processor starts execution.
The primary memory is volatile, which means the data in
memory can be lost if it is not saved when a power failure
occurs.
It is costlier than secondary memory, and the main memory
capacity is limited as compared to secondary memory.
11/27/2024 Er. Binod Rajbhar 16
Secondary Memory
Secondary memory is a permanent storage space
to hold a large amount of data.
Secondary memory is also known as external
memory that representing the various storage
media (hard drives, USB, CDs, flash drives and
DVDs) on which the computer data and program
can be saved on a long term basis.
It is cheaper and slower than the main memory.
Unlike primary memory, secondary memory
cannot be accessed directly by the CPU. Instead
of that, secondary memory data is first loaded
into the RAM (Random Access Memory) and then
sent to the processor to read and update the
data.
11/27/2024 Er. Binod Rajbhar 17
Instruction format
11/27/2024 Er. Binod Rajbhar 18
Instruction Set
A processor has a set of instructions that it
understands called as instruction set.
An instruction set or an instruction set of architecture
is a part of the computer architecture.
An instruction set is the set of all the basic operations
that a processor can accomplish.
All the programs have to communicate with the
processor using these instructions.
Examples are: Load R1, A
Add R1, B
StoreR1,X
11/27/2024 Er. Binod Rajbhar 19
Instruction Cycle
• The primary responsibility of computer
processor is to execute a sequential set of
instruction that constitute a program.
• CPU executes each instruction in a series of
steps called instruction cycle.
• Instruction cycle involves four steps:
11/27/2024 Er. Binod Rajbhar 20
Instruction Cycle
Fetching: The processor fetches the
instruction from the memory.
Decoding: The instructions that is fetched is
broken into parts or decoded.
Executing: The decoded instruction or the
command is executed.
Storing: CPU writes back the results of
execution to the computer memory.
11/27/2024 Er. Binod Rajbhar 21
Microprocessor
A microprocessor is a computer processor where
the data processing logic and control is included
on a single integrated circuit, or a small number
of integrated circuits.
The microprocessor is a multipurpose, clock-
driven, register-based, digital integrated circuit
that accepts binary data as input, processes it
according to instructions stored in its memory,
and provides results (also in binary form) as
output.
11/27/2024 Er. Binod Rajbhar 22
What is RISC and CISC Architectures?
A complex instruction set computer is a computer
where single instructions can perform numerous
low-level operations like a load from memory, an
arithmetic operation, and a memory store or are
accomplished by multi-step processes or
addressing modes in single instructions, as its name
proposes “Complex Instruction Set ”.
A reduced instruction set computer is a computer
that only uses simple commands that can be
divided into several instructions which achieve low-
level operation within a single CLK cycle, as its
name proposes “Reduced Instruction Set
11/27/2024 Er. Binod Rajbhar 23
RISC Architecture
The characteristics of RISC architecture include the following.
• Simple Instructions are used in RISC architecture.
• RISC helps and supports few simple data types and
synthesizes complex data types.
• RISC utilizes simple addressing modes and fixed-length
instructions for pipelining.
• RISC permits any register to use in any context.
• One Cycle Execution Time
• The amount of work that a computer can perform is
reduced by separating “LOAD” and “STORE” instructions.
• RISC contains a Large Number of Registers to prevent
various interactions with memory.
• Reduced instructions need a less number of transistors in
RISC.
11/27/2024 Er. Binod Rajbhar 24
CISC Architecture
The characteristics of CISC architecture include the
following.
• Instruction-decoding logic will be Complex.
• One instruction is required to support multiple
addressing modes.
• Less chip space is enough for general purpose
registers for the instructions that are 0operated
directly on memory.
• Various CISC designs are set up with two special
registers for the stack pointer, handling
interrupts, etc.
• MUL is referred to as a “complex instruction
11/27/2024 Er. Binod Rajbhar 25
Difference –
RISC CISC
Focus on software Focus on hardware
Uses both hardwired and micro
Uses only Hardwired control unit
programmed control unit
Transistors are used for storing
Transistors are used for more registers complex
Instructions
Fixed sized instructions Variable sized instructions
Can perform only Register to Register Can perform REG to REG or REG to
Arithmetic operations MEM or MEM to MEM
Requires more number of registers Requires less number of registers
Code size is large Code size is small
An instruction execute in a single clock Instruction takes more than one clock
cycle cycle
Instructions are larger than the size of
An instruction fit in one word
11/27/2024 one word
Er. Binod Rajbhar 26
Comparison between CISC and RICS
CISC RICS
Complex instruction set Reduced instruction set
computer. computer.
Large instruction set. Limited number of instruction.
Number of registers is very Large number of registers are
small.
required .
Software complexity processor
architecture complexity Software is complex processor
Pipeline is difficult. architecture is simples.
Many addressing modes. Pipeline is easy.
Instruction takes more than Few addressing modes.
one clock cycle. A instruction execute in single
clock cycles.
11/27/2024 Er. Binod Rajbhar 27
Interconnecting the units of a
computers
CPU send data , instructions and information
to the components inside the computer as
well as to the peripherals and devices
attached to it.
A collection of wires or pathways or channels
through which signal, data memory addresses
are transmitted from one part of a computer
to another is known as bus.
11/27/2024 Er. Binod Rajbhar 28
Control Bus
Control bus is the physical connection that carries
information between the CPU and other devices
within the computer.
The control bus consists of 4 to 10 parallel signal
lines that report the status of various devices.
It is the parts for all the timing and controlling
functions sent by the control units to other units
of the system.
Typically control bus signals are: Memory
Read/Write and I/O Read/Write.
11/27/2024 Er. Binod Rajbhar 29
Address Bus
Address bus is the channel which transmits
addresses of data(not the data) from the CPU
to memory.
The address bus consists of 16,20,24 or 32
parallel signal lines.
The number of lines (wires) in the address bus
determines the amount of memory that can
be directly addressed as each lines.
11/27/2024 Er. Binod Rajbhar 30
Data bus
Data bus is a channel across which actual data are
transferred between the CPU, memory and I/O
device.
The data bus consist of 8,16,32, or 64 parallel
signal lines.
Because each wire can transfer 1 bit of data at a
time, an 8 wire bus can move 8 bit at a time,
which is full byte.
The data bus is directional this means that the
CPU can read data in from memory or it can send
data out to memory.
11/27/2024 Er. Binod Rajbhar 31
Components inside a computer
cabinet
• The computer cabinet encloses the
components that are required for the running
of the computer.
• The components inside a computer cabinet
include the power supply, motherboard,
memory chips, expansion slots, ports and
interface, processor, cables and storage
devices.
11/27/2024 Er. Binod Rajbhar 32
Motherboard
The motherboard is the computer's main
circuit board.
It's a thin plate that holds the CPU, memory,
connectors for the hard drive and optical
drives, expansion cards to control the video
and audio, and connections to your
computer's ports (such as USB ports).
The motherboard connects directly or
indirectly to every part of the computer.
11/27/2024 Er. Binod Rajbhar 33
CPU/processor
The central processing unit (CPU), also called a
processor, is located inside the computer case
on the motherboard.
It is sometimes called the brain of the
computer, and its job is to carry out
commands.
Whenever you press a key, click the mouse, or
start an application, you're sending
instructions to the CPU.
11/27/2024 Er. Binod Rajbhar 34
RAM (random access memory)
• RAM is your system's short-term memory.
Whenever your computer performs calculations,
it temporarily stores the data in the RAM until it
is needed.
• This short-term memory disappears when the
computer is turned off.
• If you're working on a document, spreadsheet, or
other type of file, you'll need to save it to avoid
losing it.
• When you save a file, the data is written to the
hard drive, which acts as long-term storage.
11/27/2024 Er. Binod Rajbhar 35
Hard drive
The hard drive is where your software, documents,
and other files are stored.
The hard drive is long-term storage, which means the
data is still saved even if you turn the computer off or
unplug it.
When you run a program or open a file, the computer
copies some of the data from the hard drive onto the
RAM.
When you save a file, the data is copied back to the
hard drive. The faster the hard drive, the faster your
computer can start up and load programs.
11/27/2024 Er. Binod Rajbhar 36
Power supply unit
• The power supply unit in a computer converts
the power from the wall outlet to the type of
power needed by the computer.
• It sends power through cables to the
motherboard and other components.
11/27/2024 Er. Binod Rajbhar 37
Interfaces
Interface may refers to a hardware interface, a
software interface or sometimes it can refers to
the interaction between the user and the
computer via an input device such as the
keyboard.
It is a boundary across which two independent
systems meet and act on or communicate with
each others.
Motherboard has a certain number of I/O sockets
that are connected to the ports and interfaces
found on the rear side of a computer
11/27/2024 Er. Binod Rajbhar 38
Serial port: to connect old peripherals.
Parallel port: to connect old printers.
USB ports: to connect newer peripherals like
cameras, scanners and printers to the
computers.
RJ45 connector: ( LAN port/Ethernet port) is
used to connect the computer to a network.
VGA connector for connecting a monitor.
Audio plugs for connecting sound speakers.
PS/2 ports to connect mouse and keyboard.
11/27/2024 Er. Binod Rajbhar 39
Expansion Slots:
• An expansion slot refers to any of the slots on a
motherboard that can holds an expansion card to
expand the computer’s functionality, like a video
card, network card, sound card etc.
• The expansion cards are inserted in the
expansion slots.
• These cards gives the computer new features or
increased performances.
• There are several types of slots:
11/27/2024 Er. Binod Rajbhar 40
ISA(Industry Standard Architecture) Slots: to
connect modem and input devices.
PCI(Peripheral component Interconnect) slot:
to connect audio, video and graphics.
AGP(Accelerated Graphics Port) slot: a fast for
a graphics card.
PC card: it is used in tap top computers which
includes Wi-Fi card, network card and external
modem.
11/27/2024 Er. Binod Rajbhar 41
Video card
The video card is responsible for what you see
on the monitor.
Most computers have a GPU (graphics
processing unit) built into the motherboard
instead of having a separate video card.
If you like playing graphics-intensive games,
you can add a faster video card to one of the
expansion slots to get better performance.
11/27/2024 Er. Binod Rajbhar 42
Sound card
• The sound card—also called an audio card—is
responsible for what you hear in the speakers
or headphones.
• Most motherboards have integrated sound,
but you can upgrade to a dedicated sound
card for higher-quality sound.
11/27/2024 Er. Binod Rajbhar 43
Network card
The network card allows your computer to
communicate over a network and access the
Internet.
It can either connect with an Ethernet cable
or through a wireless connection (often called
Wi-Fi).
Many motherboards have built-in network
connections, and a network card can also be
added to an expansion slot.
11/27/2024 Er. Binod Rajbhar 44