Computer Architecture
Computer Architecture
The different components in the Computer System architecture are Input Unit, Output Unit, Storage Unit,
Arithmetic Logic Unit, Control Unit etc. A computer's hardware is composed of many different parts, but the
most important of these is the Motherboard.
A power supply unit converts Alternating Current (AC) from the main supply to low-voltage regulated Direct
Current (DC) power for the internal components of a computer. Modern personal computers universally use
Switched-Mode Power Supplies (SMPS) to perform this conversion process. SMPS is an electronic unit that
converts AC to DC, thus acting as a regulated power supply unit.
Motherboard:
The motherboard is the main component of a computer, basically a printed circuit board, that holds and allows
communication between many of the crucial electronic components of a system. It is a board with integrated
circuitry that connects the other parts of the computer including the CPU, the RAM, the disk drives as well as any
peripherals connected via the ports.
The Central Processing Unit (CPU) is the brain of the computer. It carries out all the important functions of a
computer. It receives instructions from both the hardware and active software components to produce output
accordingly. It stores all important programs like operating systems and application software. CPU also helps
Input and output devices to communicate with each other. CPU interprets and executes software instructions.
CPU Modes:
In general, every CPU supports at least 2 distinct modes of operations - Unrestricted & Restricted modes.
Unrestricted Mode - It allows the CPU to function completely without any restrictions, so it is also known as
‘Kernel Mode’. Other names for this mode includes - Supervisor Mode, Master Mode, Privileged Mode etc.
Restricted Mode - Here, the CPU functions under certain defined restrictions, so it is also called Protected mode.
Other names include - Slave mode, User mode etc.
The Central Processing Unit (CPU) has a Memory Data Register (MDR) and a Memory Address Register (MAR).
The Memory Data Register (MDR) keeps the data which is transferred between the Memory and the CPU. MDR
stores the data being transferred to and from the immediate access storage. MAR either stores the memory
address from which data will be fetched to the CPU, or the address to which data will be sent and stored.
Arithmetic & Logic Unit (ALU) – The ALU can perform various arithmetic and logical operations like addition,
subtraction and even more complex mathematical operations. An ALU is made of numerous sets of AND, OR,
XOR, and NOT, that are sequenced in a manner to execute complicated conditional statements.
Control Unit – The control unit controls the flow of data between the CPU, memory and I/O devices. It takes
instructions from memory and then decodes and executes these instructions.
The number of steps taken by a computer processor to perform each instruction/command given to it in
machine language is known as Machine Cycle. Generally, there are 4 steps involved in a machine cycle, starting
from receiving the instruction till storing the final output.
4-Steps:
The steps involved in performing a Machine Cycle can also be known as Execution Cycle, Instruction Cycle,
Fetch-Decode-Execute cycle (or) Fetch-Execute cycle.
Computer Memory:
The computer memory is divided into a large number of small parts known as cells. Computer memory is of two
types: Volatile (RAM) and Non-volatile (ROM). On the basis of space or storage location, it is of four types:
Register Memory
Cache Memory
Primary Memory
Secondary Memory
a) Register Memory:
Register memory is the smallest and fastest memory in a computer. They hold instructions that are currently
processed by the CPU. Based on the functions, Registers are classified into different types:
i. Data Register – It is a 16-bit register, which is used to temporarily store data that is being transmitted to or
received from a peripheral device.
ii. Program Counter (PC) – It holds the address of the memory location of the next instruction, which is to be
fetched after the current instruction is completed.
iii. Instruction Register – It is a 16-bit register. It stores the instruction fetched from the main memory.
iv. Accumulator Register – It is a 16-bit register that is used to store the results produced by any CPU operation.
v. Address Register – It is a 12-bit register that stores the address of a memory location where instructions or
data is stored in the memory.
b) Cache Memory:
Cache memory is a high-speed memory that is small in size but faster than the main memory (RAM). It is used
to synchronize with high-speed CPUs and to improve CPU performance. It can be a reserved part of the main
memory or a storage device outside the CPU. To improve the performance speed of the computer, Cache
memory stores the data of the next instruction to be processed, thereby preventing the computer from getting
slowed.
It holds the data and programs which are frequently used by the CPU. Cache memory can only be accessed by
CPU, by acting as a buffer between RAM and CPU, it speeds up the system performance.
c) Primary Memory:
Program and data are loaded into the primary memory before processing. The CPU interacts directly with the
primary memory to perform read or write operation. It is of two types - RAM & ROM
Volatile Memory
Non-Volatile Memory
Data can be altered or deleted. ie; allows Read & Write options
Data cannot be changed or deleted. ie; allows only Read option (Can’t be edited)
Stores certain fixed routines of the computer, like the boot - up routines
Temporary Storage
Permanent Storage
i. RAM (Volatile Memory) – It does not store data or instructions permanently. When the user switches on the
computer the data and instructions from the hard disk are stored in RAM. As soon as you shut down the
computer the RAM loses all the data.
RAM is a part of the primary storage that holds a software program and small amounts of data for processing.
Once a software program is opened, the entire program is brought from secondary storage into RAM, and small
parts of the program's instructions and data are sent into the registers and then to the CPU.
RAM is further classified into three- SRAM (Static RAM), DRAM (Dynamic RAM) & SDRAM (Synchronous
Dynamic RAM).
Static-RAM
Dynamic-RAM
Expensive
More Economical
PROM
EPROM
EEPROM
No mode of erasing
MROM (Masked ROM) - MROM is a non-volatile memory chip which has predefined functions. Here the circuit is
masked during fabrication, thus only those functions that are predefined during fabrication can be performed. In
short, MROM is a memory where the user can only read, not write instructions.
What is Integrated Drive Electronics (IDE)?
IDE is a computer interface used for connecting the motherboard to storage devices such as hard drives and CD-
ROM/DVD drives. IDE is commonly referred as Advanced Technology Attachment (ATA) or Intelligent Drive
Electronics (IDE).
Note - The C drive (C:) is the main hard disk partition which contains the operating system (OS) and the other
important system files. C drive is also known as Hard Drive.
d) Secondary Memory:
They are non-volatile memory, so it permanently stores the data even when the computer is turned off or until
this data is overwritten or deleted. The CPU can't directly access the secondary memory. First, the secondary
memory data is transferred to primary memory then the CPU can access it. Some of the common Secondary
storage devices are,
i. Hard Disk – Hard Disk Drive (HDD) or Hard disk is a rigid magnetic disc that stores data permanently. The data
is written on the platters by moving a magnetic head over the platters as they spin. The main components of a
hard drive include a head actuator, read/write actuator arm, read/write head, platter, and spindle.
ii. Solid-State Drive (SSD) – Unlike a hard drive, it does not have moving components, so it offers many
advantages like faster access time, noiseless operation, less power consumption etc.
SDD devices are quite expensive, but multiple times faster then the HDD device. A typical boot time of SSD
laptops is around 10-13 sec, whereas a HDD Laptop takes 30-40 sec for booting.
iii. Compact Disk (CD) – CD is a portable secondary storage device made of polycarbonate plastic. A
polycarbonate disc layer at the bottom has the data encoded by creating lands and pits. The data or information
is stored or recorded or encoded in CD digitally using a laser beam that etches tiny indentations or bumps on its
surface. The bump is called a pit, which represents the number 0. Space, where the bump is not created, is
called land, and it represents the number 1. Thus, the data is encoded into a compact disc by creating pits (0)
and lands (1).
CD-ROM – CD-Read Only Memory, contains pre written data by the manufacturer that can be read multiple
times. Here memory is non-erasable.
WORM DISK – Also known as ‘Write Once Read Many’ type disk, this allows the user to write data permanently
into its memory. Here also the memory is non-erasable.
CD-RW – CD Rewritable (RW) are optical disks in which data can be erased by the user and rewritten multiple
times.
iv. Floppy Disk - Floppy disk is composed of a thin, flexible magnetic disk sealed in a square plastic carrier.
Floppy disks were widely used to distribute software, transfer files, and create backup copies of data. To read
and write data from a floppy disk, a computer system must have a floppy disk drive (FDD).
v. Digital Video Disc (DVD) - A device currently used to store data in large amounts and accepts high-definition
material. A two-layered DVD can hold approximately 17 gigabytes of video, sound, or other data.
Generally, the surface of a disc is divided into a number of concentric rings called ‘Tracks’ & each track is
subdivided into ‘Sectors’. Ie; A sector is the smallest memory unit in a memory disk.
vi. Blu-ray Disc – The upgraded version of CD and DVD discs and drives are the Blu-ray discs. It is commonly
known as BD-ROM. The Maximum capacity of BD disc is 25GB if single layer and 50 GB if dual layer.
vii. Holographic Versatile Disc (HVD) – It is a holographic storage format and has a maximum capacity of 3.9
terabytes.
viii. Flash Drives – Flash drives are small, ultra-portable storage devices. They connect to computers and other
devices via a built-in USB plug. They are often referred to as pen drives, thumb drives, or jump drives. Mostly they
have a storage capacity from 8 GB to 64 GB.
ix. Zip Disks – An advanced version of the floppy disk is known as Zip Disks. It was developed by Iomega. Zip
disks are available in 100, 250 MB & 750 MB capacities and they are used to store, share and back up large
amounts of data.
Note - ‘Formatting’ is the process of erasing entire data present in the disk
Memory Units:
The computer memory units start from a ‘bit’ . A bit is the smallest memory unit to measure data stored in main
memory and storage devices. A bit can have only one binary value out of 0 and 1.
Note – A 4-bit word is called a “Nibble”. While an 8-bit word is called a “Byte”.
Byte is the fundamental unit to measure data. It is equal to 8 bits. Thus a byte can represent 2^8 or 256 values.
Unit
Number of Bits
Either 0 or 1
Nibble
4 bits
Byte
8 bits
Word/Double Byte
16 bits/2 bytes
32 bits/4 bytes
Unit
Capacity
Magnitude
Performance
Kilobyte (KB)
1 KB = 1024 Bytes
Kilo = 103
KiloFLOPS
Megabyte (MB)
1 MB = 1024 KB
Mega = 106
MegaFLOPS
Gigabyte (GB)
1 GB = 1024 MB
Giga = 109
GigaFLOPS
Terabyte (TB)
1 TB = 1024 GB
Tera = 1012
TeraFLOPS
Petabyte (PB)
1 PB = 1024 TB
Peta = 1015
PetaFLOPS
Exabyte (EB)
1 EB = 1024 PB
Exa = 1018
ExaFLOPS
Zettabyte (ZB)
1 ZB = 1024 EB
Zetta = 1021
ZettaFLOPS
Yottabyte (YB)
1YB = 1024 ZB
Yotta = 1024
YottaFLOPS
Note - Computer performance is generally measured in FLOPS - ‘Floating Point Operations Per Second’
A computer is primarily for processing data. A computer system considers everything as data, be it instructions,
pictures, songs, videos, documents, etc. Data can also be raw and unorganized facts that are processed to get
meaningful information. Internally, a computer stores every data in 0s & 1s. Data requires interpretation to
become information. Data processing in computers involves 3 key steps – Data Capturing, Data Storage & Data
Retrieval.