You are on page 1of 26

Introduction to Computers

Computer is an electronic device that performs mathematical and non-


mathematical operations with the help of instructions to process the given
information in order to achieve desired results.

Characteristics of Computers
Speed: Computers have tremendous processing speed.
Accuracy: They are very accurate. Error can only occur due to faulty
instructions or hardware malfunctioning.
Reliability: At hardware level, computers do not require human intervention
between its processing operations.
Storage Capability: Computers can store large amounts of data and it can
recall the required information almost instantaneously.
Versatility: They can perform multiple tasks simultaneously with equal ease.
Diligence: Computers do not get tired and they do not suffer from lack of
concentration.
Lack of Intelligence: As a machine, a computer can only perform what it is
programmed to do, nothing more and nothing less.
Evolution of Computers
• Computers were preceded by many devices which
mankind developed for their computing
requirements. Some of them are:

Sand Table Abacus Napier Bones Slide Rule


Pascaline Stepped Reckoner Punch Card System Difference Engine
Analytical Engine Hollerith's Tabulator

Abacus Pascaline Stepped Reckoner


Generations of Computers
The history of computer development is often referred to in reference to the different
generations of computing devices. Computers can be classified into five generations.

First Generation Computers (1940-56)


 Vacuum tube based machines. Fourth Generation Computers
 Very large, slow, and unreliable machines. (1970's-Till Date)
 Expensive to operate and consumed large  Microprocessor-based systems.
amount of electricity.  Cheapest among all the other
Second Generation Computers (1956-63) generations.
 Transistor based machines.
 Portable and very reliable.
 Smaller as compared to first generation  GUI based software.
computers.  Hardware failure is negligible, so less
 More reliable and less prone to hardware maintenance is required.
failure.
Fifth Generation Computers (Future)
Third Generation Computers (1964-Early
 Still in the development stage.
'70s)
 Integrated circuit (IC) based machines.
 Will respond to natural language input.
 Portable and reliable than the second  Will have the capability of learning and
generation. self-organisation.
 Consumed less power and generated less  Will use artificial intelligence and
heat. knowledge-based problem solving
techniques.
Classification of Computers

According to Purpose
General: A general-purpose computer is designed to perform a
range of tasks.
Specific: These computers are designed to handle a specific
problem or to perform a single specific task.

According to Data Handling Techniques


Analog: A computing machine that works on the principle of
measurement, i.e. the measurements obtained can be translated
into desired data.
Digital: A computer that operates with information, numerical or
otherwise, represented in a digital form.
Hybrid: Hybrid computer incorporated the measuring feature of
an analog computer and counting feature of a digital computer.
According to Functionality
Micro: A small, low cost digital computer, which usually
consists of a microprocessor, a storage unit, an input
channel, and an output channel, all of which may be on one
chip inserted into one or several PC boards. Micro computers
Laptop PDA
include desktop, laptop, and hand-held models such as PDAs
(Personal Digital Assistants).
Mini: A small digital computer, which normally is able to
process and store less data than a mainframe but more than
a micro computer, while doing so less rapidly than a
mainframe but more rapidly than a micro computer.

Mainframe: An ultra-high performance computer made for high-volume, processor-


intensive computing which consists of a high-end computer processor, with related
peripheral devices, capable of supporting large volumes of data processing, high
performance on-line transaction processing systems, and extensive data storage and
retrieval.
Super: A computer that has the highest processing speed for solving scientific and
engineering problems and contains a number of CPUs that operates in parallel to
make it faster.
The Computer System

• A computer system essentially has three important components:


• Central Processing Unit (CPU): This unit performs processing of
instructions and data inside the computer.
• Input Unit: This component of the computer accepts instructions and data.
• Output Unit: This unit communicates the results to the user.

Application of Computers

• Nowadays our lives are dependent (directly or indirectly) on computers for


information processing. They not only save time, but also save paper work.
Some of the areas where computers are being used are:
• Science
• Education
• Medicine and Health Care
• Engineering/Architecture/Manufacturing
• Entertainment
• Communication
• Business Application
• Publishing
• Banking
Number Systems and Logic Gates

A number system defines a set of values used to represent quantity. The number systems can be categorised into
two broad categories:
Non-Positional Number Systems Positional Number Systems

Base (or Radix) of a System


In the number system, the base or radix tells the number of symbols used in the system. The base or radix of the
decimal system is 10. This implies that there are 10 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

Number System Radix Value Set of Digits


Decimal r = 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Binary r=2 0, 1
Octal r=8 0, 1, 2, 3, 4, 5, 6, 7
Hexadecimal r = 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
• Conversion between Number Bases
• Decimal to Binary Decimal Fraction to Binary Fraction

(16)10 (0.375)10

2 16 Remainder = 0.375 × 2 = 0.750 0


2 8 0 = 0.750 × 2 = 1.500 1
2 4 0 = 0.500 × 2 = 1.000 1
2 2 0 Binary equivalent of (0.375)10 is (0.011)2
1 0
Binary equivalent of (16)10 is (10000)2
Binary to Decimal Binary Fraction to Decimal Fraction
(11010)2 (0.01101)2
= 1 × 2 4 + 1 × 2 3 + 0 × 22 + 1 × 2 1 + 0 × 2 0 = 0 × 2-1 + 1 × 2-2 + 1 × 2-3 + 0 × 2-4 + 1 × 2-5
= 16 + 8 + 0 + 2 + 0 = 26 = 0 + 0.25 + 0.125 + 0 + 0.03125 = 0.40625
Decimal equivalent of (11010)2 is (26)10 Decimal equivalent of (0.01101)2 is (0.40625)10

Decimal
8 to Octal Remainder
359 Decimal
= 0.3125 Fraction
× 8 = to2.Octal
5 Fraction
2
8 10
(359) 44 7 = 0.5 10× 8
(0.3125) = 4.0 4
8 5 4 Octal equivalent of (0.3125)10 is (0.24)8
8 0 5
Octal equivalent of (359)10 is (547)8

= 4 × 8 2 + 5 × 8 1 + 6 × 80 = 2 × 82 + 3 × 81 + 7 × 80 + 0 × 8-1 + 4 × 8-2
= 256 + 40 + 6 = 302 = 128 + 24 + 7 + 0 + 0.0625 = 159.0625
Decimal equivalent of (456)8 is (302)10 Decimal equivalent of (237.04)8 is (159.0625)10

Octal to Decimal Octal Fraction to Decimal Fraction


(456)8 (237.04)8
Decimal to Hexadecimal Decimal Fraction to Hexadecimal Fraction
(5112)10 (0.625)10

16 5112 Remainder = 0.625 × 16 = 10.000 10 = A


16 319 8=8 = 0.000 × 16 = 0.000 0=0
16 19 15 = F Hexadecimal equivalent of (0.625)10 is (0.A0)16
16 1 3=3
16 0 1=1
Hexadecimal equivalent of (5112)10 is (13F8)16

= 11 × 162 + 1 × 161 + 4 × 160 = 10 × 160 + 2 × 16-1 + 3 × 16-2


= 2816 + 16 + 4 = 2836 = 10 + 0.125 + 0.01171875 = 10.13671875
Hexadecimal to Decimal
Decimal equivalent of (B14)16 is (2836)10 Hexadecimal Fraction
Decimal to Decimal
equivalent Fraction
of (A.23) 16 is (10.13671875)10

(B14)16 (A.23)16

1 1 10
+ +
1 1 0 1
1 1 1 1
- 1 0 1 1
+ 1 0 1 0
0 0 1 0
1 1 0 0 1

Binary Arithmetic
Binary Addition Binary Subtraction
Complement
The complement of a number is the number which when added to
the original will make it equal to a multiple of the base number
system.

Binary Coding
The most commonly used coding systems are:
Binary Coded Decimal (BCD)
American Standard Code for Information Interchange (ASCII)
Extended Binary Coded Decimal Interchange Code (EBCDIC)

Logic Gates
The term gate is used to describe the set of the basic electronic
components which when combined with each other, are able to
perform complex logical and arithmetic operations. Numerically, this
involves only two symbols - 0 and 1.
Basic Logic Gates
• AND Gate: The output is HIGH (1) when all the inputs are HIGH,
otherwise it is LOW (0). A dot (.) is used to show the AND operation.
• OR Gate: The output is HIGH (1) when any of the inputs are HIGH;
otherwise it is LOW (0). A plus (+) is used to show the OR operation.
• NOT Gate: This gate changes one logic level (HIGH / LOW) to the
opposite logic level, i.e. it changes '1' to '0' and vice versa.

Combinational Logic Gates


• NAND Gate: The output is LOW (0) only when all the inputs are HIGH
(1).
• NOR Gate: The logical operation of the NOR gate is such that the
output is HIGH (1) only when all the inputs are LOW (0).
• XOR Gate: The output is HIGH (1), when the inputs are not equal to
each other.
• XNOR Gate: The output is HIGH (1) when the inputs are equal to each
other.
The CPU
Computer Architecture
Computer architecture is the science of selecting and interconnecting hardware
components to create computers that meet functional, performance, and cost goals. It
can also be described as the logical structure of the computer system.

Central Processing Unit (CPU)


It is referred as the ‘brain’ of a computer system. The central processing unit consists
of three main subsystems, the Control Unit (CU), the Arithmetic Logic Unit (ALU), and
the Registers. The three subsystems work together to provide the operational
capabilities of the computer.

Registers
The registers are special purpose, high-speed temporary memory units. They hold
various types of information such as data, instructions, addresses, and the
intermediate results of calculations. The important registers within CPU are:
Program Counter (PC)
Instruction Register (IR)
Memory Address Register (MAR)
Memory Buffer Register (MBR)
Accumulator (ACC)
Data Register (DR)
Registers and its Functions
Program Counter (PC): Keeps track of the next instruction to be
executed.
Instruction Register (IR): Holds the instruction to be decoded by
the control unit.
Memory Address Register (MAR): Holds the address of the
next location in memory to be accessed.
Memory Buffer Register (MBR): Used for storing data either
coming to the CPU or data being transferred by the CPU.
Accumulator (ACC): It is a general-purpose register used for
storing temporary results and results produced by arithmetic
logical unit.
Data Register (DR): Used for storing the operands and other
data.
Control Unit
• The control unit can be thought of as the ‘heart’ of the CPU. It controls
the I/O devices and transfer of data to and from the primary storage.
Control unit repeats a set of four basic operations:
• Fetching: The process of obtaining a program instruction or data item
from memory.
• Decoding: The process of translating the instruction into commands
the computer can execute.
• Executing: The process of carrying out the commands.
• Storing: The process of writing the result to memory.
Arithmetic Operations

Addition
Subtraction
Multiplication
Division
Arithmetic Logic Unit
ALU carries out arithmetic and logical operations on the data
made available to it. It comprises of:

Arithmetic Unit: It contains the circuitry that is responsible for


performing the actual computing and carrying out the arithmetic
calculations, such as addition, subtraction, multiplication, and
division.

Logic Unit: It contains the ability to provide CPU to make


logical operations based on the instructions provided to it. These
operations include logically comparing two data items and take
different actions based on the results of the comparison.
Memory
The primary memory is part of the main computer system. This memory itself is implemented by two types of
memory technologies.
Random Access Memory (RAM): Random access memory directly provides the required information to the
processor.
Read Only Memory (ROM): Read only memory can only be read, not written. The contents of ROM are not lost
even in case of a sudden power failure, making it non-volatile in nature.

Cache
A cache is a piece of very fast memory, made from high-speed static RAM that
reduces the access time of the data. It is very expensive and generally
incorporated in the processor, where valuable data and program segments are
kept. The cache facilitates the system to catch up with the processor's speed.

Communication between Various Units of Computer System


All the units in a computer system work in conjunction with each other to formulate a functional computer system.
There are two type of communication followed in the computer architecture, these are:
Processor to Memory Communication
Processor to I/O Devices Communication

The Instruction Format


Instructions tell the processor what actions need to be performed on the
data. Instructions are transferred one at a time into the processor, where
they are decoded and then executed. Each instruction is composed of
two parts: the op-code and the operand.
The Instruction Cycle
The main job of the computer system is to execute instructions. The instruction cycle details the sequence of
events that takes place as an instruction is read from memory and executed. A simple instruction cycle would
consist of the following steps:
Fetch Cycle: Fetching the instruction from the memory.
Decode Cycle: Decoding the instruction.
Execute Cycle: Executing the instruction.
Store Cycle: Storing the result back to the memory.

Instruction Set
Processors are built with the ability to execute a limited set of basic operations. The collection of these operations is
known as the processor's instruction set. Based upon the instruction sets, there are two common types of
architectures:
Complex Instruction Set Computer (CISC)
Reduced Instruction Set Computer (RISC)

Multiprocessor System
Computer systems that include more than one processor are called multiprocessor systems or parallel systems. In
a multiprocessing system, two or more independent processors are linked together in a coordinated system. In
such systems, instructions from different and independent programs can be processed at the same time, by
different processors.
Symmetric Shared Memory Multiprocessor
Asymmetric Shared Memory Multiprocessor
Primary Memory
Memory refers to the electronic holding place for instructions and data where the computer's microprocessor can
reach quickly.

Memory Representation
The various units, used to measure computer memory, are as follows:

Unit Symbol Bytes


Byte B 20 =1 byte
Kilobyte KB 210 = 1024 bytes
Megabyte MB 220 = 1024 KB
Gigabyte GB 230 = 1024 MB
Terabyte TB 240 = 1024 GB

Memory Hierarchy
The memory in a computer system is of three fundamental types:
Internal Processor Memory: Includes cache memory and special
registers.
Primary Memory: Includes Random Access Memory (RAM) and
Read Only Memory (ROM).
Secondary Memory: Includes hard disk, magnetic disk, and
magnetic tapes.

Random Access Memory (RAM)


RAM allows the computer to store data for immediate manipulation and to keep track of what is currently being
processed. It is the place in a computer where the operating system, application programs, and data in current use
are kept so that they can be accessed quickly by the computer's processor.
Types of RAM
Static RAM: This RAM retains the data as long as power is provided to the memory chips. It does not need to be
'refreshed' (pulse of current through all the memory cells) periodically.
Dynamic RAM: This type of RAM must be continually 'refreshed' in order for it to maintain the data. This is done by
placing the memory on a refresh circuit that rewrites the data several hundred times per second.

SRAM Cell DRAM Cell

Types of SRAM
Asynchronous SRAM (ASRAM) Burst SRAM (BSRAM)
Pipeline Burst SRAM (PB SRAM)

Types of DRAM
Fast Page Mode DRAM (FPM DRAM) Extended Data Out DRAM (EDO DRAM)
Burst Extended Data Output DRAM (BEDO DRAM) Synchronous DRAM (SDRAM)
Rambus DRAM (RDRAM) Video RAM (VRAM)
Double Data Rate Synchronous DRAM (DDR SDRAM)

Read Only Memory (ROM)


A computer system needs special instructions (special boot programs) during a login operation. These instructions
are stored in the special chips, which enable the computer system to perform start operations and transfer the
control to the operating system. This special chip is called ROM (Read Only Memory) chip.
Types of ROM
Masked ROM Programmable ROM (PROM)
Erasable Programmable ROM (EPROM) Electrically Erasable Programmable ROM (EEPROM)
Flash ROM

Interaction between RAM, ROM, and CPU


Secondary Storage
Secondary storage is used to store data and programs when they are not being processed.

Benefits of Secondary Storage


Non-Volatile Large Storage Capacity
Reliability Convenience
Low Cost Reusability
Portability

Classification of Secondary Storage


Secondary storage is classified according to the method of data access.
(sequential and direct).
Sequential Access Storage Devices: Magnetic Tape
Direct Access Storage Devices: Magnetic Disk, Optical Disk, and
Magneto-Optical Disk.

Magnetic Tape
Magnetic tape looks like the tape used in music cassettes.
The data is stored in the form of tiny segment of magnetised
and de-magnetised portion on the surface of the material. The
tape is divided into vertical column (frames) and horizontal
rows (channels). The data is stored in a string of successive
frames with one data per frame. Each frame is further divided
into rows or tracks. A magnetic tape can typically have 7-9
tracks. A bit can be stored in each track, with one byte per
frame.
Magnetic Disk
A magnetic disk comprises a thin piece of plastic/metal circular plate, which is
coated with magnetic oxide layer. Data is represented as magnetised spots on a
disk. A magnetised spot represents 1 and absence of a spot represents a 0. The
surface of the disk is divided into imaginary tracks and sectors (track and disk). The
track sectors are grouped into a collection known as cluster.

Types of Magnetic Disk


Floppy Disk: A removal round, flat piece of mylar plastic, coated with ferric oxide and encased in a protective
plastic cover.
Hard Disk: It is the primary storage unit of computer. It consists of disk platters that are made up of aluminum alloy
or glass substrate coated with a magnetic material and protective layers.
Zip Disk: It is a removal storage device whose disk is made up of plastic material on which magnetic oxide
particles are coated.

Optical Disk
An optical disk is a flat, circular, plastic disk coated with material on
which bits may be stored in the form of highly reflective areas and
significantly reflected areas, from which the stored data may be read
when illuminated with a narrow beam source, such as laser diode.
Unlike magnetic disks, optical disk consists of single long track in the
form of spiral shape.
Types of Optical Disk
CD-ROM (Compact Disk-Read Only Memory) Disk: As the name implies, it comes pre-recorded with data, which
cannot be altered.
WORM (Write Once Read Many) Disk: These types of disks can be used to read as well as to write (usually once)
data onto their surfaces.

Magneto-Optical Disk
This disk is a hybrid of magnetic and optical technology, employing laser to read data onto the disk, while using
magnetic field to write data.

Mass Storage Devices


Redundant Array of Inexpensive Disk (RAID): It is a combination of multiple hard disks into an array of disk
drives to obtain high performance, large capacity, and reliability that exceeds that of a single large drive.
Automated Tape Library: It comprises numerous set of magnetic tapes along with their drives and controllers
mounted in a single unit.
CD-ROM Jukebox: It comprises numerous set of CD-ROM disks along with their drives and controllers mounted in
a single unit.

You might also like