Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

MODULE 1

Components of a Computer System:

● Input Unit :The input unit consists of input devices that are attached to the
computer. These devices take input and convert it into binary language that the
computer understands. Some of the common input devices are keyboard, mouse,
joystick, scanner etc.
● Central Processing Unit (CPU) : Once the information is entered into the
computer by the input device, the processor processes it. The CPU is called the
brain of the computer because it is the control center of the computer. It first
fetches instructions from memory and then interprets them so as to know what is
to be done. If required, data is fetched from memory or input device. Thereafter
CPU executes or performs the required computation and then either stores the
output or displays on the output device. The CPU has three main components
which are responsible for different functions – Arithmetic Logic Unit (ALU),
Control Unit (CU) and Memory registers
● Arithmetic and Logic Unit (ALU) : The ALU, as its name suggests performs
mathematical calculations and takes logical decisions. Arithmetic calculations
include addition, subtraction, multiplication and division. Logical decisions
involve comparison of two data items to see which one is larger or smaller or
equal.
● Control Unit : The Control unit coordinates and controls the data flow in and out
of CPU and also controls all the operations of ALU, memory registers and also
input/output units. It is also responsible for carrying out all the instructions stored
in the program. It decodes the fetched instruction, interprets it and sends control
signals to input/output devices until the required operation is done properly by
ALU and memory.
● Memory Registers : A register is a temporary unit of memory in the CPU. These
are used to store the data which is directly used by the processor. Registers can be
of different sizes(16 bit, 32 bit, 64 bit and so on) and each register inside the CPU
has a specific function like storing data, storing an instruction, storing address of a
location in memory etc. The user registers can be used by an assembly language
programmer for storing operands, intermediate results etc. Accumulator (ACC) is
the main register in the ALU and contains one of the operands of an operation to
be performed in the ALU.
● Memory : Memory attached to the CPU is used for storage of data and
instructions and is called internal memory The internal memory is divided into
many storage locations, each of which can store data or instructions. Each
memory location is of the same size and has an address. With the help of the
address, the computer can read any memory location easily without having to
search the entire memory. when a program is executed, it’s data is copied to the
internal memory and is stored in the memory till the end of the execution. The
internal memory is also called the Primary memory or Main memory. This
memory is also called as RAM, i.e. Random Access Memory. The time of access
of data is independent of its location in memory, therefore this memory is also
called Random Access memory (RAM).
● Output Unit : The output unit consists of output devices that are attached with the
computer. It converts the binary data coming from CPU to human understandable
form. The common output devices are monitor, printer, plotter etc.

DISKS:

Magnetic Disk provide the bulk of secondary storage for modern computer systems.
Each disk platter has a flat circular shape, like a CD.
The surface of a platter is logically divided into circular tracks which are subdivided into
sectors.
Disk speed has two parts. The Transfer Rate is the rate at which data flow between the drive
and the computer. The Positioning Time sometimes called Random Access Time, consists of
the time necessary to move the disk arm to the desired cylinder, called the Seek Time and the
time necessary for the desired sector to rotate to the disk head, called the Rotational Latency.

It is a non-volatile storage device.


Hard Disk Drive is installed internally in our computer systems, which is connected directly
to the disk controllers of the motherboard.

The point to be noted here is that outer tracks are bigger in size than the inner tracks but they
contain the same number of sectors and have equal storage capacity. This is because the
storage density is high in sectors of the inner tracks whereas the bits are sparsely arranged in
sectors of the outer tracks. Some space of every sector is used for formatting. So, the actual
capacity of a sector is less than the given capacity.

MEMORY:

The computer memory holds the data and instructions needed to process raw data and
produce output. The computer memory is divided into large number of small parts known as
cells. Each cell has a unique address which varies from 0 to memory size minus one.

Computer memory is of two types: Volatile (RAM) and Non-volatile (ROM). The secondary
memory (hard disk) is referred as storage not memory. But, if we categorize memory on
behalf of space or location, it is of four types:

● Register memory
● Cache memory
● Primary memory
● Secondary memory

Cache memory is a high-speed memory, which is small in size but faster than the main
memory (RAM). The CPU can access it more quickly than the primary memory. So, it is used
to synchronize with high-speed CPU and to improve its performance.
Cache memory can only be accessed by CPU. It can be a reserved part of the main memory
or a storage device outside the CPU. It holds the data and programs which are frequently used
by the CPU. So, it makes sure that the data is instantly available for CPU whenever the CPU
needs this data. In other words, if the CPU finds the required data or instructions in the cache
memory, it doesn't need to access the primary memory (RAM). Thus, by acting as a buffer
between RAM and CPU, it speeds up the system performance.

Primary Memory: It is of two types: RAM and ROM.

RAM (Volatile Memory): It is a volatile memory. It means it does not store data or
instructions permanently. When you switch on the computer the data and instructions from
the hard disk are stored in RAM.
CPU utilizes this data to perform the required tasks. As soon as you shut down the computer
the RAM loses all the data.
ROM (Non-volatile Memory): It is a non-volatile memory. It means it does not lose its data
or programs that are written on it at the time of manufacture. So it is a permanent memory
that contains all important data and instructions needed to perform important tasks like the
boot process.
Secondary Memory

The secondary storage devices which are built into the computer or connected to the
computer are known as a secondary memory of the computer. It is also known as external
memory or auxiliary storage.

The secondary memory is accessed indirectly via input/output operations. It is non-volatile,


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.

Example of Secondary memory: Hard Disk, Solid State disk, pendrive, CD(CompactDisk)
etc.

COMPILERS:
It is a translator which takes input i.e., High-Level Language, and produces an output of
low-level language i.e. machine or assembly language.
● But its program run time is more and occupies a larger part of memory. It has slow
speed because a compiler goes through the entire program and then translates the
entire program into machine codes.

2. Interpreter:
An interpreter is also a software program that translates a source code into a machine
language. However, an interpreter converts high-level programming language into machine
language line-by-line while interpreting and running the program.

S.No. Compiler Interpreter

Compiler scans the whole program Translates program one statement at a


1.
in one go. time.

As it scans the code in one go, the


Considering it scans code one line at
2. errors (if any) are shown at the end
a time, errors are shown line by line.
together.

Due to interpreters being slow in


Main advantage of compilers is it’s
3. executing the object code, it is
execution time.
preferred less.

It does not convert source code into


It converts the source code into
4. object code instead it scans it line by
object code.
line
It does not require source code for It requires source code for later
5
later execution. execution.

Python, Ruby, Perl, SNOBOL,


Eg. C, C++, C# etc.
MATLAB, etc.

You might also like