0% found this document useful (0 votes)
25 views

Unit -1 Notes (1)

This document provides an introduction to computers, detailing their functions, advantages, and disadvantages. It explains the difference between data and information, types of computers, basic operations, characteristics, and the evolution of computer generations from the first to the fifth. Each generation is characterized by advancements in technology, from vacuum tubes to ultra-large scale integration chips, highlighting their features, advantages, and notable examples.

Uploaded by

kiruthikvenkat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Unit -1 Notes (1)

This document provides an introduction to computers, detailing their functions, advantages, and disadvantages. It explains the difference between data and information, types of computers, basic operations, characteristics, and the evolution of computer generations from the first to the fifth. Each generation is characterized by advancements in technology, from vacuum tubes to ultra-large scale integration chips, highlighting their features, advantages, and notable examples.

Uploaded by

kiruthikvenkat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 105

UNIT I

1. INTRODUCTION TO COMPUTERS

1.1 Introduction

Computer System is an electronic data processing device which does the following:

 Accept and store the input data

 Process the input data

 Output the processed data in required format

A computer is an electronic machine that accepts information, stores it until the information is needed,
processes the information according to the instructions provided by the user, and finally returns the results to
the user.

The computer can store and manipulate large quantities of data at very high speed, but only disadvantage is
that a computer cannot think.

COMPUTER stands for:

 C - Common

 O - Oriented

 M - Machine

 P - Particularly

 U - Used For

 T - Trade

 E - Education And

 R – Research

Definition

 Computer is a fast operating electronic device which accepts and stores raw input data processes them
and produces output according to the instruction.
 A computer is an electronic machine designed for performing calculations and controlling logical or
arithmetic operations.

 A computer is an electronic device that performs various operations with the help of instructions to
achieve desire results.

Advantages

 Computer is a very fast device.


 Computer is very accurate.
 The computer is 100% error free.
 Computers can do all jobs with 100% accuracy.
 The computer can store large data than human beings.
 A computer will never become tired or monotonous.
 A computer will never lack concentration.
 It can do repeated work with same speed and accuracy.
 A computer is versatile.
 A computer is very flexible i.e. it can perform different jobs at a time.
 The use of computers for data processing in an organization can reduce paper work speeds up the
process.
 Though the initial investment for installing a computer is high it can reduce money for human in many
ways.

Disadvantages

Disadvantages of computers are negligible when compared to its advantage.

 A computer is just a machine and has no intelligence.


 It cannot think.
 A computer cannot take any decision on its own.
 So it is fully dependent on human being.
 The operating environment of computer should be dust free and suitable to it.
 Computer has no feeling or emotions.
 It cannot make Judgment based on feeling, taste, experience and knowledge

1.1.1 Data Vs Information

What is Data?

Data is raw, unorganized facts that need to be processed. Data can be something simple and seems random
and useless until it is organized and processed.

 The word ‘Data’ is derived from the plural form of Latin word ‘Datum’, which means ‘to give’.
 Data is a collection of raw facts.
 It May or may not be meaningful. For example ‘23’ is a meaningless data.
 Input to any system may be treated as Data.
 Data must be processed to understand.
Example: Statistics, numbers, characters, images.

What is Information?

When data is processed and organized it is called Information.

 The word ‘Information’ is derived from Latin word ‘Informare’, which means ‘to instruct’.
 Information is the outcome derived after processing the data.
 Information is always meaningful.
 Output after processing the system is Information.
 Information is already in understandable form, it may be processed further to make it more
understandable.
 Example Reports, Knowledge.

Data Vs Information

Data Information

Data is Unprocessed raw information. Information is processed raw data

It is meaningless It is meaningful

Data are atomic pieces of information. Information is a collection of data.

Example: 10, 12.5 Example: 10 Rs, 12.5 CM

1.1.2 Types of Computers?

Computers are classified based on Principles of Operation.

There are three different types of


computers according to the principles
of operation. Those three types of
computers are

1. Digital Computer

2. Analog Computer
3. Hybrid Computer

Digital Computer: A digital computer operates on digital data (0 and 1). It uses binary number system in
which there are only two digits 0 and 1.

Analog Computer: Analog Computer is a computing device that works on continuous range of values.
(between 0 and 1)It generally deals with physical variables such as voltage, pressure, temperature, speed, etc.

Hybrid Computer: A hybrid computer combines the desirable features of analog and digital computers.
Now-a-days analog-to-digital and digital-to-analog converters are used for transforming the data into suitable
form.

1.1.3 What a Computer does?

A computer can "do" only ONE thing. It can ADD 1's and 0's.

To perform all other mathematical functions the computer adds 1's and 0's in creative ways For example to
multiply 5 with 4 (5x4) a computer adds 5 four times (5+5+5+5)
Everything a computer does (Example playing video & audio, printing documents etc) is just addition of 1's
and 0's.

1.1.4 Operations of Computers

The computer performs has five basic operations and they are Input, Process, Output, Storing and Controlling.

1.Input:

It is the process of capturing or acquiring the information, or it is the process of accepting data or information,

2.Process:

It is the process of converting the input into output. It is the important part of any task

3.Output:

It is the result, which comes after processing the data.

4.Storage:

It is the process of storing the data or information or instructions, so that the user can use it whenever
required.

5.Control:

It is the process of controlling and directing the sequence in which all the operations are to be performed.
1.2 Characteristics of Computers

Computer has spread to the nook and corner of this world .Each and every individual in this world is
somehow dependent on the computer

Speed: A computer is a very fast device. It can carry out instructions at a very high speed. It can perform in a
few seconds the amount of work that a human being can do in an entire year (Even if he work day and night
and does nothing else).. The speed of computer is calculated in MHz that is one million instructions per
second.
Accuracy: Accuracy of a computer is consistently high and the degree of accuracy of a particular computer
depends on the instructions and the type of processor. But for a particular computer, each and every
calculation is performed. For example, the computer accurately gives the result of division of any number up
to 10 decimal points.
Versatility: Versatility is one of the salient features of the computer. Versatility is nothing but the Multi-
processing ability of computer. One moment, a computer will analyze the results of particular examination,
the next moment it will be busy preparing electricity bills, and in between it may be help to search an
important letter in seconds.

It can perform different types of tasks with same speed and accuracy.

Briefly, a computer is capable of performing almost any task provided that the task can be reduced to a series
of logical steps.

Reliability: Computer has a high level for reliability. Thus computers never make mistakes of their own.

If it makes a mistake it means that a human might have given a wrong instruction.

A computer has an amazing Power of Remembering. It can remember a data for an infinite time, unless it is
intentionally deleted by the user

A computer can store and recall any amount of information because of its secondary storage capability. Every
piece of information can be retaining as long as desired by the user. Even after several years, the information
recalled will be as accurate as on the day when it was fed to the computer.

Diligence: The computer is just a machine, does not suffer from the human characters such as tiredness. It can
work for days together without getting any symptoms of tiredness it does not lose concentration even after
working continuously for a long time.

This characteristic is especially useful for those jobs where same tasks are done again and again. It can
perform long and complex calculations with same speed and accuracy from the start till the end.
For example an ATM machine will be working nonstop for years together with same speed and accuracy
Storage: The computers have a lot of storage devices which can store a tremendous amount of data. Data
storage is an important aspect of the computer.

Second storage devices like floppy disk can store a large amount of data permanently. The secondary storage
can range from 1Mega Byte (a floppy disk) to 1Tera Byte(External Hard Disk Drive).The secondary storage
devices can be easily attached and detached whenever needed.

Resource Sharing: In the initial stages of development, computer used to be an isolated machine. With the
tremendous growth in computer technologies, today's computers have the capability to connect with each
other. This has made the sharing of costly resources like printers possible. Apart from device sharing, data
and information can also be shared among groups of computers, thus creating a large information and
knowledge base.

No I.Q: A computer is a magical device. It can only perform tasks that a human being can. The difference is
that it performs these tasks with unthinkable speed and accuracy.

It possesses no intelligence of its own. Its I.Q is zero. It can only perform what is programmed to do. Hence,
only the user can determine what tasks a computer will perform.

Making a computer to think (Artificial intelligence) has been now a wide area of research.

1.3 The Computer Generation

1.3.1 Introduction

Generation in a computer terminology means the change in the technology that is being used in a computer.

Initially the term generation was used to distinguish between varying hardware technologies. But nowadays,
generation includes both hardware and software, which together make up an entire computer system.

There are totally five computer generations known till date. Each generation has been discussedin detail along
with their time period, characteristics.

Following are the main five generations of computers

1.3.2 First Generation (1945 – 1956)


 First generation computer used vacuum tubes as memory devices.
 The computers were of large size.
 It is very costly.

Assembly language is used for programming.

 Colossus was the first electronic computer of this Generation. It’s every aspect was kept secret by
British Government.
 In 1945, Von Neumann Architecture was introduced. Eckert and Mauchley began working on
EDVAC (Electronic Discrete Variable Automatic Computer) but it never completed. Later Von
Neumann developed his own EDVAC (IAS machine).
 In 1946, the development of ENIAC (Electronic Numerical Integrator and Computer), which was
started in 1943, was completed.
 In 1954, first version of FORTRAN (Formula Translator) was published by IBM.

Features:

 Vacuum tube technology

 Supported Machine language

Advantages:

 It was the fastest machine during that time.

Disadvantages:

 Unreliable

 Very costly

 Generate lot of heat

 Huge size and Consumed lot of electricity

 Need of Air Condition to maintain the room temperature.

Some computer of this generation were:


 ENIAC

 EDVAC

 UNIVAC

 IBM-701

 IBM-650

1.3.3 Second Generation (1956 – 1963)

Second generation computers used

 Transistors as CPU components


 Ferrite cores for main memory
 Magnetic disk drum/tapes as secondary memory.
 High level languages FORTRAN, ALGOL, BASIC and COBOL as programming language.

Transistors increased the processing power of computer and decreased the size, cost and power usage as well.

The main features of Second Generation are:

 Use of transistors

 Support machine and assembly languages

Advantages

 Reliable as compared to First generation computers

 Smaller size as compared to First generation computers

 Generate less heat as compared to First generation computers

 Consumed less electricity as compared to First generation computers

 Faster than first generation computers


Disadvantages

 It is very costly

 Need of Air Condition to maintain the room temperature.

Some computer of this generation were:

 IBM 1620

 IBM 7094

 CDC 1604

 CDC 3600

 UNIVAC 1108

1.3.4 Third Generation (1964 – 1971)

The invention of silicon ICs (Integrated Circuits) allowed dozens of transistors to be put on a single chip.

They used magnetic disks as memory devices but later they were replaced by semiconductor memories.

Some of the important invention in third generation are:

 Multiprogramming.
 The computers were more powerful and smaller than previous generations.
 Some of the programming languages built in this generation are: ada, PASCAL, BCPL,
SHRDLU, FORTRAN 66 and 77, SEQUEL (nowadays it is called SQL)
 Intel introduced its microprocessors - Intel 4004, Intel 8080, 8086, 8088.
 Examples of third generation of computer are Apple computers, CDC's Cyber- 175 and PDC
series, STAR 1100 etc.

The main features of Third Generation are:


 Integrated Chips used

 Supported multiprogramming

 Support high level language

Advantages:

 More reliable

 Smaller size

 Generate less heat

 Faster

 Lesser maintenance

 Consumed lesser electricity

Disadvantages:

 Still costly

 Need of Air Condition to maintain the room temperature.

Some computer of this generation were:

 IBM-360 series

 Honeywell-6000 series

 PDP(Personal Data Processor)

 IBM-370/168

 TDC-316

1.3.5 Fourth Generation (1971 – Present)


The fourth generation computers use VLSI chips for both CPU and memory.

The VLSI technology allowed millions of transistors to be fabricated on a single chip. This high density of
fabrication directly affected the size and sped of the machine.

With heavy drop in price, it become possible for single individual to have his/her own computer.

Some of the achievements in this generations are:

 RISC (Reduced Instruction Set Computers) was introduced.


 Superscalar computers and personal computers were introduced.
 User friendly and fast computer with virtual technology were available in the market.
 Improvement on distributed system, and network communication system.

The main features of Fourth Generation are:

 VLSI technology used

 Development of Personal Computer's

 Pipeline processing

 Concept of internet was introduced

 Great developments in the fields of networks

 Computers became easily available

Advantages

 Very cheap

 Portable and reliable.

 Very small size

 No Air Condition is needed


Disadvantages

 Artificial intelligence has not been completely implemented

Some computer of this generation were:

 DEC 10

 STAR 1000

 PDP 11

 CRAY-1(Super Computer)

 CRAY-X-MP(Super Computer)

1.3.6 Fifth Generation (Present and Beyond)

 These computers will use ULSI (Ultra Large Scale Integration) chips.
 These generation computers have been focusing on developing intelligent computers which can
have vision, learning ability, object recognition and synthesis ability, natural language
understanding ability.
 The input and output of the computes will be in the form of speech and graphic
 These computers use optic fiber technology to handle Artificial Intelligence, expert systems, robotics
etc. These computers have very high processing speeds and are more reliable.
 All the Higher level languages like C and C++, Java, .Net etc. are used in this generation.

Artificial Intelligence includes:

 Robotics

 Neural networks

 Game Playing

 Development of expert systems to make decisions in real life situations.

 Natural language understanding and generation.


The main features of Fifth Generation are:

 ULSI technology

 Development of true artificial intelligence

 Development of Natural language processing

 Advancement in Parallel Processing

 Advancement in Superconductor technology

 More user friendly interfaces with multimedia features

All disadvantages of the previous generation computers have been replace by the fifth generation computes

Some computer types of this generation are:

 Desktop

 Laptop

 Notebook

 UltraBook

 ChromeBook

COMPARISION IN GENERATIONS OF COMPUTERS

1ST 2nd 4th


3rd GENERATION 5th GENERATION
GENERATION GENERATION GENERATION

PERIOD 1940-1956 1956-1963 1964-1971 1971-PRESENT TODAY -FUTURE

INTEGRATED MICROPROCESSOR ARTIFICIAL


CIRCUITRY VACUUME TUBE TRANSISTOR
CIRCUITS (IC) (VLSI) INTELLIGNCE

MEMORY CAPACITY
20 KB 128KB 1MB 1 GB 1 TB
MEASURED IN
BEYOND
PICOSECONDS
MEASURED IN AND MIPS
PROCESSING SPEED 300IPS 300IPS 1MIPS
NANO SECONDS (MILLION OF
INSTRUCTION
PER SECOND)

HIGH LEVEL
PROGRAMMING ASSEMBLY ALL LATEST
LANGAUGAE(FORTR
LANGAUAGES C, C++ C , C++ , JAVA LANGUAGES
AN , ALGOL)

LESS COMPARE TO
POWER CONSUMED HIGH LESS LESS LESS
1ST GEN.

LESS SPACE SMALL & CAN


SMALL & USED IN VERY
COMPARE TO 1ST BE USED IN
SIZE VERY LARGE HOMES SMALL
GENERATION HOMES
i5, i6, i7
UNIVAC, ENIAC, IBM 1401,IBM IBM 360 PENTIUM SERIES ,
EXAMPLES OF EDSAC, EDVAC, 7094,CDC3600,D SERIES,1900 MULTIMEDIA,
COMPUTERS and UNIVAC. UNIVAC 1108 SERIES STIMULATION

1.4 Classification of Computers

1.4.1 Based on the Size and Capacity

The digital computers that are available nowadays vary in their sizes and types. The computers are broadly
classified into four categories based on their size and type

(1) Microcomputers,

(2) Minicomputers,

(3) Mainframe computers, and

(4) Supercomputer.

1.4.1.1 Micro Computer

 A microprocessor is a processor whose components such as input, output and CPU are present on a
single integrated circuit chip.
 Including power supply, connecting cables, appropriate peripherals (keyboard, monitor, printer,
others) and other software programs forms a complete micro computer system.
 These are normally single microprocessor systems (single – user systems) designed for small
applications.
 It is mainly used in offices, homes, shops, etc.
 They brought revolution in the history of computers.
 They are also known as Personal Computers.
 They are cheap and user friendly.
 The main components are Monitor, CPU, Keyboard, Mouse, Speakers, Modem and Printer.

IBM PCs, Apple MACs, IBM PS/2 are examples.

1.4.1.2 Mini Computer

 Mini computers are larger than the micro computers and are more powerful in terms of processing
power.
 Mini computers are mainly multiprocessor systems where many users simultaneously work on the
systems. It is capable of supporting from 4 to about 200 simultaneous users.
 Mini computers can be used for interactive applications in industries, research organizations, colleges
and universities.
 They are used for data processing also.

Disadvantages

 They have less memory & storage capacity than mainframe computers.
1.4.1.3 Mainframe Computer

 A Mainframe is an ultra – high performance computer


 It consists of computer processor, capable of supporting large volumes of data processing and
extensive data storage & retrieval.
 It is used in research organizations, large industries, banks and airline reservation where large database
is required.

Advantages

 They have wide range of peripherals attached.


 They have large storage capacity.
 They can use wide variety of software’s.

Disadvantages

 They are sensitive to temperature, humidity, dust etc.


 Qualified & trained operators are required to operate them.
 They are not user friendly.
1.4.1.4 Super Computers

 Super computers are specially designed to maximize the numbers of FLOPS (Floating Point Operation
per Second)
 A Super Computer has the highest processing speed
 It is suitable for solving scientific and engineering problems.
 They are huge computers installed in space centers, nuclear power stations etc.
 They are used for performing complex mathematical calculations.
 They are used for weather forecasting, animation graphics etc

Advantages

 They are having huge memories & tremendous processing speed.

Disadvantages

 Only scientists and mathematicians can operate them.

E.g. CRAY - 3, PARAM


1.4.2 Based on Utility

1.4.2.1 General Purpose Computer

 These are designed and constructed to cater almost all the needs of the society.
 They are able to perform according to the programs created to meet different needs.
 These can be used for a variety of tasks from financial, accounting to mathematical calculations.
 They are also flexible and can be used to work on business and scientific problems.

1.4.2.2 Special Purpose Computer

 They can be designed to perform specific functions.


 The instructions needed to perform the particular task are incorporated into the internal memory of the
computer.
 Some of the special purpose computers are aircraft control system, electronic voting machines, etc.

1.4.3 Based on Functionality/Hardware Design

1.4.3.1 Analog Computer

Introduction

 The analog computer works on the supply of continuous electrical signals. The display is also
continuous and its output is in the form of graphs.
 Computations are carried out with physical quantities such as voltage, length, current, temperature etc.
the devices measuring such quantities are called analog devices.
 The analog computer operates by measuring instead of counting.
 The advantage is that all calculations take place parallelly and hence it is very fast.

Characteristics of the Analog Computers

 These computers have no state


 The Speed of analog computer is fast
 These computers are not reliable
 These computers became the base for digital computers
 These computers are difficult to operate and use
 These computers are easy to develop
 These computers have small memory

Example:

 Thermometer is the example of analog computers because it measures the length of a mercury column
continuously
 A traditional clock is the example of analog computers because the needle of clock covers the distance
of dial continuously.
 Weight machine and Speedo meter are other examples of analog computers.

1.4.3.2 Digital Computer

Introduction

 In digital computer, numeric and non - numeric information are represented as strings of digits.
 The data is represented by binary notation in the form of 0’s and 1’s.

Characteristics of the Digital Computers


 Digital computers have two states On (0) and Off (1).
 These computers are easy to use.
 Human being likes to use digital computers.
 These computers are reliable.
 Digital computers have big memory.
 Working speed of digital computers is slower as compared to analog computers.
 These computers are further divided into different categories such as personal computers, Mainframe
computers and super computers.

Examples

 Digital watch, digital petrol stations and the computer, which we use nowadays, are the examples of
digital computers

1.4.3.3 Hybrid Computer

Introduction

 In a hybrid computer, the measuring functions are performed by the analog while control and logic
functions are digital in nature.
 Weather monitoring systems and devices in intensive care units of the hospitals are examples of
hybrid computers.

Characteristics of the Hybrid computers:

 These computers are reliable and provide accurate result.


 These computers are fast and speedy.

Example:

 In ICU (Intensive care unit) of a hospital hybrid computers are used. These computers analog quality
controls the temperature of the room digital quality informs the doctor about the blood pressure,
temperature and physical status of the patient.
 In Cement factory a hybrid computer is used where all calculations are performed by the digital
computers; and actions like increase of material are performed by the analog computers.

Difference Between Analog and Digital

Analog Digital
Analog signal is a continuous signal which Digital signals are discrete time signals
Signal:
represents physical measurements. generated by digital modulation.
Waves: Denoted by sine waves Denoted by square waves
Uses continuous range of values to represent Uses discrete or discontinuous values to
Representation:
information represent information
Analog Digital
Computers, CDs, DVDs, and other digital
Example: Human voice in air, analog electronic devices.
electronic devices.
Analog technology records waveforms as they Samples analog waveforms into a limited set of
Technology:
are. numbers and records them.
Data Subjected to deterioration by noise during Can be noise-immune without deterioration
transmissions: transmission and write/read cycle. during transmission and write/read cycle.
Response to Less affected since noise response are analog in
More likely to get affected reducing accuracy
Noise: nature
Flexibility: Analog hardware is not flexible. Digital hardware is flexible in implementation.
Can be used in analog devices only. Best Best suited for Computing and digital
Uses:
suited for audio and video transmission. electronics
Applications: Thermometer PCs, PDAs
There is no guarantee that digital signal
Analog signal processing can be done in real processing can be done in real time and
Bandwidth:
time and consumes less bandwidth. consumes more bandwidth to carry out the same
information.
Memory: Stored in the form of wave signal Stored in the form of binary bit
Power: analog instrument draw large power digital instrument draw only negligible power
Cost: low cost and portable cost is high and easily not portable
Impedance: Low high order of 100mega ohm
analog instruments usually have a scale which
digital instruments are free from observational
Errors: is cramped at lower end and give considerable
errors like parallax and approximation errors
observational errors
1.5 Basic Computer Organization

Computer organization is a study of a Computer Architecture. E.g. Memory, Registers, RAM, ROM, CPU,
ALU, 16 bit/32 bit/64 bit architectures.

 A computer is an information processing machine. It can be viewed as a system, which consists of


number of interrelated components that work together with the aim of converting unprocessed data
into information.
 To attain information, data is entered through input devices.
 This data is processed using the central processing unit
 Then the processed data is displayed to the users using various output devices.

1.5.1 Introduction

A Computer Performs basically five major operations or functions The five basic operations of a Computer
System

1. Inputting.

The process of entering data and instructions into the computer system.
2. Storing.

Saving data and instructions to make them readily available for processing whenever required.

3. Processing.

Performing arithmetic operations (add, subtract, multiply, divide, etc.) or logical operations

(Comparisons like equal to, less than, greater than, etc.) on data to convert them into useful

Information.

4. Outputting.

The process of producing useful information or results for the user via printed report or visual display.

5. Controlling.

Directing the manner and sequence in which all of the above operations are performed.

1.5.2 Input Unit

 This is the process of entering data and programs in to the computer system. You should know that
computer is an electronic machine like any other machine, which takes input as raw data and performs
some processing giving out processed data or information.
 Therefore, the input unit takes data from us to the computer in an organized manner for processing.
 Input devices are electromechanical devices that allow the user to feed information into the computer
for analysis, storage and giving commands to the Central Processing Unit.
 Data and instructions are entered into the memory of a computer through input devices.
 It captures information and translates it into a form that can be processed by the central processing
unit.
 Computer accepts input in either manually or directly.
 In case of manual data entry, the user enters the data into the computer by hand. For example, by using
keyboard and mouse.
 In case of direct entry, information is fed into the computer automatically from a source document
(like barcode).
 Some of the important input devices are:
Keyboard, Mouse, Light pen, Trackball, Joystick, Scanner etc.

1.5.3 Central Processing Unit

 CPU is the abbreviation for central processing unit. Sometimes it is referred as the central processor,
but more commonly it is called processor,
 The CPU is the brains of the computer where most calculations take place.
 In terms of computing power, the CPU is the most important element of a computer system.
 Popular CPU Manufacturers are Intel, AMD.
 Computer CPU’s (processors) is composed of thousands of transistors.

Transistors are tiny, nearly microscopic bits of material that will block electricity when the electricity is only
a weak charge, but will allow the electricity pass through when the electricity is strong enough.

Different units of CPU are as follows

Control Unit (CU): Controls the operation of the CPU and hence the computer.
Arithmetic and Logic Unit (ALU): Performs computer’s data processing functions.

Register: Provides storage internal to the CPU.

CPU Interconnection: It provides for communication among the control unit, ALU, and register.

1.5.3.1 Control Unit

 CPU is partitioned into Arithmetic Logic Unit(ALU)and Control Unit (CU)


 The function of control unit is to generate relevant timing and control signals to every operation in the
computer.
 It controls the flow of data between the processor, memory and peripherals

Functions Of Control Unit

 The control unit directs the entire computer system to carry out stored program instructions.
 The control unit must communicate with both the arithmetic logic unit (ALU) and main memory.
 The control unit instructs the arithmetic logic unit that to perform logical or arithmetic operation.
 The control unit co-ordinates the activities of the other units , peripherals and auxiliary storage devices
linked to the computer

1.5.3.2 Arithmetic Logic Unit (ALU)

 The ALU is divided into two units, an arithmetic unit


(AU) and a logic unit (LU).
 The arithmetic unit executes arithmetic and logical
operations and the logical unit executes logical
operation.
 Arithmetic operations include addition,
subtraction, multiplication and division.
 Logical operations include comparing numbers, letters
and special characters.
 Comparison operations test for three possible conditions:
- equal-to condition (checks if two values are equal)
- less-than condition (checks if one value is smaller than the other)
- greater-than condition (checks if one value is larger than the other)
 Relational operations (=, <, >) are used to describe the comparison operations used by the arithmetic
logic unit.
 The arithmetic logic unit also performs logic functions such as AND, OR and NOT.
 The accumulator is used to accumulate results. It is the place where the answers from many operations
are stored temporarily before being moved to the computer's memory.
 The other general-purpose registers also hold data on which operations are to be performed by the
arithmetic logic unit.

1.5.3.3 Memory Unit

 Computers require memory to process data and store output.


 Memory refers to the electronic holding place for instructions and data.
 It is usually an array of cells.
 We can classify memory into two broad categories:
1. Primary memory (to handle the data temporarily)
2. Secondary memory (to store permanently)

Primary Memory: (Volatile/Main Memory)

 Primary memory is also known as main memory


 It stores data and instructions for
processing.
 This is generally used to hold the
program that is being currently executed in the
computer. It also holds the data being
received from the input unit, the intermediate and final results of the program.
 The primary memory generally loses its contents when the computer is switched off.
 There are two types of computer memory inside the computer, one is RAMMING and the other is
ROM.
 RAM: RAM stands for Random Access Memory.
 When we switch a computer off, whatever is stored in the RAM gets erased.
 It is volatile memory.
 ROM: ROM stands for Read Only Memory
 When we switch the computer off, the contents of the ROM does not become erased
 It is stored permanently. Therefore it is non-volatile.

Secondary Memory: (Non – Volatile Memory)

 It may store several programs, documents, databases, etc


 Secondary memory is also known as auxiliary memory or external memory
 It is used for storing instructions and data.
 It stores the data permanently.
 The data or information stored in this storage will not be erased when the system is switched off is
lost.
 It is a non – volatile memory.
Example: Hard Disk, pen drive, CD, DVD, etc.

Units of Computer Memory Measurements

 It is the amount of data that can be stored in the storage unit.

 The storage capacity is expressed in terms of Bytes.

1 Bit = Binary Digit

8 Bits = 1 Byte
1024 Bytes = 1 KB (Kilo Byte)
1024 KB = 1 MB (Mega Byte)
1024 MB = 1 GB(Giga Byte)
1024 GB = 1 TB (Terra Byte)
1024 TB = 1 PB (Peta Byte)
1024 PB= 1 EB (Exa Byte)
1024 EB = 1 ZB (Zetta Byte)
1024 ZB = 1 YB (Yotta Byte)
1024 YB = 1 (Bronto Byte)
1024 BB = 1 (Geop Byte)

1.5.4 Output Unit

 Devices used to get the response or result of a process from the computer is called output devices.
 An output device is an electromechanical device, which converts machine-readable information into
human-readable form.
 The basic functioning of output device is just the opposite of the input device, that is, the data are 'fed
into' the computer system through the input device, while the output is 'taken out' from the computer
through the output device.
 The output, which comes out from the CPU, is in the form of digital signals.
 The output devices display the processed information by converting them into graphical, alphanumeric
or audio-visual form.

The output devices are classified into hard copy and soft copy output devices.

 The physical form of output is known as hard copy.


 The electronic version of an output, which usually resides in computer memory and disk, is known as
soft copy.

Printers, plotters, and microfilms are the most commonly used hard copy output devices while monitors, voice
response systems, projectors, electronic whiteboards, and headphones and headsets are some commonly used
soft copy output devices.

1.6 Number System

1.6.1 Introduction

 A number is required for counting or to express the amount of some quantity.


 It consists of a group of symbols called digits, which are arranged in a definite manner.
 A number system is defined using a base, where a base is another natural number.
 A base of the system determines how many different digits are there to represent numbers in a number
system
 The most widely adopted system is the decimal number system which has ten digits (0, 1, 2, 3, 4, 5, 6,
7, 8, 9)
 The octal system has eight digits (0, 1, 2, 3, 4, 5, 6, 7)
 The hexadecimal system has sixteen digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) and the binary
system has only two (0 & 1).
The number systems are 1. basically
Positional number system
of two types:
2. Non positional number system
Positional Number System
 The most widely used number system is the positional number system.
 In this system the position of a digit indicates the significance to be attached to that digit.
 For Example : 3987
7 * 100 -> Unit Position

8 * 101 -> Tenth Position

9 * 102 -> 100th Position

3 * 103 -> 1000th Position

Non-positional Number System


 The non positional number system with which all of us are familiar is the Roman number system.
 The position does not represent significance.
 For Example : I II III IV V

Note : Positional Vs Non-Positional : In a positional number system, the position has significance and
values. Example: Decimal number system. In non-positional number systems, the position of the
number isn't a determining factor. Example: roman numerals.
1.6.2 Types of Number System

It is an organized and systematic way of representing number.

Types

1. Binary System

 It is a number system with base digits 0 or 1.


 It can be written as subscripted B or 2.
 For example:(1001)B or (1001)2
2. Octal Number System

 It is a number system with base 8 and uses digits 0 to 7.


 It can be written as subscripted O or 8.
 For example :( 205) O or (205)8.
3. Decimal Number System

 It is number system with base 10 and use digits 0 to 9.


 It can be written as subscripted D or 10.
 For example: (268)D or (158)10.

4. Hexa Decimal Number System

 It is a number system with base 16 and use digits 0 to 9 and symbols A to F.


 It can be written as subscripted 16 or H.
 For example :( 2AB)H or (ABC)16.

1.6.3 Decimal Number System

 Decimal number system is also called Hindu-Arabic or Arabic number system.


 It is a positional numeral system.
 It has 10 as the base with 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
 The number system that is most commonly used is the decimal number system.
 In the decimal number system, the successive position to the left of the decimal point represents units,
tens, hundreds, thousands, etc.
Example:
In decimal number system 258.34 10 or 258.34 consists the digits
4 (4 * 10-2) order of 1/100
3 (3 * 10-1) order of 1/10
8 (8 * 100) order of 1
5 (5 * 101) order of 10
2 (2 * 102) order of 100
and its values can be written as
(2 * 102) + (5 * 101) + (8 * 100) + (3 * 10-1) + (4 * 10-2)
(2 * 100) + (5 * 10) + (8 * 1) +( 3 * 1 / 10) + (4 * 1 / 100)
200 + 50 + 8 + 0.3 + 0.04
(258.34)10 = 258.34
1.6.4 Binary Number System

Introduction to Binary

 Computer systems are made up of digital electronics.


 The language they speak is electricity.
 At any given point in time, a computer circuit can only be in one of two states:"On" or "off"
 The "on and off" language is called the binary. Binary is a number system that uses only two symbols
to represent numbers, namely 0 ("zero") and 1 ("one").
 It is also called as Boolean language. Boolean means "true or false" The computer can understand only
Binary language or Boolean Language.
 Everything can be represented as binary values.
Example:

The decimal value of "T" is 84, and 84 can be represented in binary form as 01010100

Binary Number System

 All digital computers are based on binary number system


 Binary means two, the binary system uses only two digits i.e. 0’s and 1’s.
 The base or radix of binary number system is (2).
 Each digit in the binary is called as bits.
 The weight assigned to bits in this system is in power of 2.
For Example,

In binary number system 100102 consists the digits.

0 (0 * 20)order of 1

1 (1* 21)order of 2

0 (0* 22)order of 4

0 (0 * 23) order of 8

1 (1 * 24) order of 16

(1* 24) + (0 * 23) + (0 * 22) + (1 * 21) + (0 * 20)

(1* 16) + (0 * 8) + (0 * 4) +( 1 * 2) + (0 * 1)
16 + 0 + 0 + 2 + 0

(18)10

1.6.5 Octal Number System

 The Octal Number system is a common system used with computers.


 Because of its relationship with the binary system, it is useful in programming some types of
computers.
 Octal means 8. The base or radix of octal number is 8.
 The number system with base or radix (8) is known as octal number system. They use eight digits
i.e. 0, 1,2,3,4,5,6,7.
For Example,

In an octal number system 105728 consists the digits.

2 (2 * 80) order of 1

7 (7* 81) order of 8

5 (5* 82) order of 64

0 (0 * 83) order of 512

1 (1 * 84) order of 4096

(1* 84) + (0 * 83 ) + (5 * 82) + (7 * 81) + (2 * 80)

1* 4096) + (0 * 512) + (5 * 64) + ( 7 * 8) + (2 * 1)

4096 + 0 + 320 + 56 + 2

(4474)10

1.6.6 Hexadecimal Number System

 The Hexadecimal or base 16 number system is important to programmers because it's a shorthand
way of writing out and inputting binary.
 "hex" means six(6), and "dec" means ten(10),
 The word hexadecimal means six and ten i.e. sixteen.
 The base or radix of the hexadecimal number system is 16.
 There are sixteen (16) symbols in a hexadecimal number system.
 The symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and A, B, C, D, E, and F.
A =10;

B=11;

C=12;

D=13;

E=14,

F=15.

Note: the numbers 10-15 in a Hexadecimal number system must be written as A-F respectively.

Example:

In Hexadecimal number system 10A2B16 consists of the digits.

B (11* 160) order of 1

2 (2* 161)order of 16

A (10* 162) order of 256

0 (0 * 163) order of 4096

1 (1 * 164) order of 65536

(1* 164) + (0 * 163 ) + (10 * 162) + (2 * 161) + (11 * 160)

(1* 65536) + (0 * 4096) + (10 * 256) + ( 2 * 16) + (11 * 1)

65536 + 0 + 2560 + 32 + 11

(68139)10

 Instead of representing 11 as B, if we represent it as 11, we would have some trouble in reading the
value of the Hexadecimal.
 For Example: Instead of writing 1B5, if we write as1115, then it will lead to error. i.e. when we
convert into decimal 437 will be interpreted as 4373.
1.6.7 Conversion : Natural Number Conversion

 Conversion is nothing but converting the numbers in one base to another base:
(Number)x =(Number)y

 There are certain rules called as conversion rules that tells us how to convert values form one base to
another base.
There are three different strategies in converting a number form one base to another base.

Strategy 1: Converting a Decimal number to another base.

Strategy 2: Converting another base number to decimal number.

Strategy 3: Converting one base number to another base number.

1.6.7.1 Converting a Decimal Number to Another Base

1.6.7.1.1 Decimal to Binary Conversion

A number can be converted from decimal to binary using repeated division method.

Repeated Division

The following are the steps in converting a decimal number to a binary number.

Step1 : Divide the number by2 (whenever you divide a number by 2, you will get either
0 or 1 as remainder).
Step 2 : Write down the remainder one by one from right to left.(right most digit of a
number is called Least Significant Bit and left most digit of a number is called
Most Significant Bit)
Step3: If the Quotient becomes zero go to Step4, otherwise go to step1.
Step4 : The number you obtain by writing down the remainder is the converted binary number.
Example of Repeated Division

Convert (1792)10 Decimal to Binary


Decimal Number Operation Quotient Remainder Binary Result

1792 ÷2= 896 0 0

896 ÷2= 448 0 00

448 ÷2= 224 0 000

224 ÷2= 112 0 0000

112 ÷2= 56 0 00000

56 ÷2= 28 0 000000

28 ÷2= 14 0 0000000

14 ÷2= 7 0 00000000

7 ÷2= 3 1 100000000

3 ÷2= 1 1 1100000000

1 ÷2= 0 1 11100000000

0 Done.

(1792)10  (11100000000)2

1.6.7.1.2 Decimal to Octal Conversion

A number can be converted from decimal to octal using repeated division.

Repeated Division:

The following are the steps in converting a decimal number to an octal number.

Step1 : Divide the number by 8(whenever you divide a number by 8, you will get 0,
1, 2, 3,4,5,6 or 7 as remainder).
Step 2: Write down the remainder one by one from right to left.
Step3: If the Quotient becomes zero go to Step4, otherwise go to step1.
Step4 : The number you obtain by writing down the remainder is the converted octal
number.
Example of Repeated Division:

Convert (1792)10 Decimal to Octal

Decimal Number Operation Quotient Remainder Octal Result

1792 ÷8= 224 0 0

224 ÷8= 28 0 00

28 ÷8= 3 4 400

3 ÷8= 0 3 3400

0 Done.

(1792)10  (3400)8

1.6.7.1.3 Decimal to Hexadecimal Conversion

A number can be converted from decimal to Hexadecimal using repeated division.

Repeated Division:

The following are the steps in converting a decimal number to a Hexadecimal number.

Step1 : Divide the number by 16 (whenever you divide a number by 16, you will get 0, 1,
2, 3,4,5,6,7,8,9,A(10),B(11),C(12),D(13),E(14),F(15) as remainder).
Step 2 : Write down the remainder one by one from right to left.
Step3 : If the Quotient becomes zero go to Step4, otherwise go to step1.
Step4 : The number you obtain by writing down the remainder is the converted
Hexadecimal number.
Example of Repeated Division:

Convert (1792)10 Decimal to Hexadecimal:

Decimal Number Operation Quotient Remainder Hexadecimal Result

1792 ÷ 16 = 112 0 0

112 ÷ 16 = 7 0 00
7 ÷ 16 = 0 7 700

0 done.

(1792)10 (700)16

Example of Repeated Division:

Convert (2564)10 Decimal to Hexadecimal:

Decimal Number Operation Quotient Remainder Hexadecimal Result

2564 ÷ 16 = 160 4 4

160 ÷ 16 = 10 0 04

7 ÷ 16 = 0 10 A04

0 Done.

(2564)10  (A04)16

Note: when converting from decimal to hexadecimal if the remainder is greater than 9, the
corresponding hexadecimal equivalent should be written.
1.6.7.1.4 General Algorithm for Converting Decimal Number to Other Base Number

Repeated Division

The following are the steps in converting a decimal number to another Base number.

B represents the Base of the number.

Step1 : Divide the number by B (whenever you divide a number by B, you will get a
number between 0 and B-1 as a remainder).
Step 2 : Write down the remainder one by one from right to left.
Step3 : If the Quotient becomes zero go to Step4, otherwise go to step1.
Step4 : The number you obtain by writing down the remainder is the converted Base B number.
Example:

Here is an example of using repeated division to convert (1792)10 decimal to Base 5


Decimal Number Operation Quotient Remainder Base 5 Result

1792 ÷5= 358 2 2

358 ÷5= 71 3 32

71 ÷5= 14 1 132

14 ÷5= 2 4 4132

2 ÷5= 0 2 24132

(1792)10  (24132)5

1.6.7.2 Converting From Other Base Number to Decimal number

1.6.7.2.1 Binary to Decimal

A number can be converted from binary number to Decimal number using positional notation method.

Algorithm

1. Multiply the Value of right most digits with 20.


2. Move to next rightmost digit, if there is no digit to the right of the binary number then go to Step 6.
3. Multiply this rightmost digit value with 2i, where i=1, initially.
4. Increment the value of i
5. Go to Step2
6. Add every value obtained in Step 3
7. Add the Value obtained in Step 6with the value obtained in Step 2
8. The value of Step 7 is the converted decimal number

Example 1

Converting (1101)2 into decimal

The digits are 1 1 0 1 LSB

1. Multiply the Value of right most digit (LSB) with 20.

1 X 20 = 1
2. Move to next rightmost digit, if there is no digit to the right of the binary number then go to Step 6.

Here The next right most digit is 0 (1101)

The next right most digit is 1 (1101)

The next right most digit is 1 (1101)

Then there is no digits to the right

3. Multiply this rightmost digit value with 2i, where i=1, initially.

0 X 21 =0

1 X 22 =4

1 X 23 =8

4. Increment the value of i

i=1

i=2

i=3

5. Go to Step2

6. Add every value obtained in Step 3.

0+4+8 = 12

7. Add the Value obtained in Step 6 with the value of Step 2

12+1=13

8. The value of Step 7 is the converted decimal number

(1101)2  (13)10

Result : (1101)2  (13)10

Example 2:

(1110101)2 to Decimal or (1110101)2 to ( ? )10


Moving from right most digits ,we right the value one by one from top to bottom

Value Value of i Value X 2i

1 0 1 X 20 1X1 1

0 1 0 X 21 0X2 0

1 2 1 X 22 1X4 4

0 3 0 X 23 0X8 0

1 4 1 X 24 1 X 16 16

1 5 1 X 25 1 X 32 32

1 6 1 X 26 1 X 64 64

1 + 0 + 4 + 0 + 16 + 32 + 64 = (117)10

Result (1110101)2  (117)10

Formula for Converting Binary to Decimal:

Where N is the number of digits in the binary number.

1.6.7.2.2 Octal to Decimal

A number can be converted from Octal number to Decimal number using positional notation method.

Algorithm

1. Multiply the Value of right most digit with 80.


2. Move to next rightmost digit, if there is no digit to the right of the octal number then go
to Step 6.
3. Multiply this rightmost digit value with 8i, where i=1, initially.
4. Increment the value of i
5. Go to Step2
6. Add every value obtained in Step 3
7. Add the Value obtained in Step 6 with the value obtained in Step 2
8. The value of Step 7 is the converted decimal number

Example 1

Converting (1025)8 into decimal or (1025) 8 to ( ? )10

The digits are 1 0 2 5 LSB

1. Multiply the Value of right most digits (LSB) with 80.

5 X 80 = 5

2. Move to next rightmost digit, if there is no digit to the right of the Octal number then go to

Step 6.

Here The next right most digit is 2 (1025)

The next right most digit is 0 (1025)

The next right most digit is 1(1025)

Then there is no digits to the right

3. Multiply this rightmost digit value with 8i, where i=1, initially.
2 X 81 =16

0 X 82 =0

1 X 83 =512

4. Increment the value of i

i=1

i=2

i=3

5. Go to Step 2
6. Add every value obtained in Step 3.

16+0+512 = 528

7. Add the Value obtained in Step 6 with the value of Step 2

528+5=533

8. The value of Step 7 is the converted decimal number

Result (1025)8  (533)10

Example 2

(20126)8 to Decimal

Moving from right most digits ,we right the value one by one from top to bottom

Value Value of i Value X 8i

6 0 6 X 80 6X1 6

2 1 2 X 81 2X8 16

1 2 1 X 82 1 X 64 64

0 3 0 X 83 0 X 512 0

2 4 1 X 84 2 X 4096 8192

6 + 16 + 64 + 0 + 8192 = (8278)10

(20126)8  (8278)10

Formula for Converting Octal Number to Decimal Number

Where N is the number of digits in the Octal number.

1.6.7.2.3 Hexa decimal to Decimal

A number can be converted from Hexa decimal number to Decimal number using positional notation method.
Algorithm

1. Multiply the Value of right most digit with 160.

2. Move to next rightmost digit, if there is no digit to the right of the Hexadecimal number then
go to Step 6.

3. Multiply this rightmost digit value with 16i, where i=1, initially.

4. Increment the value of i

5. Goto Step2

6. Add every value obtained in Step 3

7. Add the Value obtained in Step 6 with the value obtained in Step2

8. The value of Step 7 is the converted decimal number

Example

Converting (ABC1)16 into decimal

The digits are ABC1 LSB

1. Multiply the Value of right most digit (LSB) with 160.

1 X160 = 1

2. Move to next rightmost digit, if there is no digit to the right of the Hexadecimal number

then Go to Step 6.

Here The next right most digit is C (ABC1)

The next right most digit is B (ABC1)

The next right most digit is A (ABC1)

Then there is no digits to the right

3. Multiply this rightmost digit value with 16i, where i=1, initially.

C X 161 => 12 X 16 =192


B X 162 => 11 X 256 =2816

A X 163 => 10 X 4096 =40960

4. Increment the value of i

i=1

i=2

i=3

5. Go to Step 2

6. Add every value obtained in Step 3.

40960+2816+192 = 43968

7. Add the Value obtained in Step 6 with the value of Step 2

43968+1=43969

8. The value of Step 7 is the converted decimal number

(43969)10

(ABC1)16  (43969)10

Example 2:

(10E7)16 to Decimal

Moving from right most digits ,we right the value one by one from top to bottom

Value Value of i Value X 16i

7 0 7 X 160 7X1 7

E 1 14 X 161 14 X 16 224

0 2 0 X 162 0 X 256 0

1 3 1 X 163 1 X 4096 4096

7 + 224 + 0 + 4096 = (4327)10


(10E7)16  (4327)10

Formula for Converting the Hexa Decimal Number to Decimal Number

Where N is the number of digits in the Hexa decimal Number

1.6.7.2.4 General Formula for converting a number from any base to the Decimal
number

Where N is the number of digits in the given number and B is the base of the given number

Example

Consider a base 5 number (2431)5 to be converted into decimal

Value Value of i Value X 5i

1 0 1 X 50 1X1 1

3 1 3 X 51 3X5 15

4 2 4 X 52 4 X 125 500

2 3 2 X 53 2 X 625 1250

1 + 15 + 500 + 1250 = (1766)10

(2431)5  (1766)10

1.6.7.3 Converting One Base Number to Other Base Number

There are two steps that are to be followed in converting a number form base X to base Y.
 First convert the Base X number to an equivalent Decimal number using Positional Notation method.
 Then convert the Decimal number to Base Y number using Repeated Division method
1.6.7.3.1 Binary to Octal

There are two steps that are to be followed in converting a number form Binary to Octal.

 First convert the Binary number to an equivalent Decimal number using Positional Notation method.
 Then convert the Decimal number to Octal number using Repeated Division method
Example:

(1011001)2  (X)8

Step1: Binary to Decimal by Positional Notation method:

(1011001)2 (Y)10

Value Value of i Value X 2i

1 0 1 X 20 1X1 1

0 1 0 X 21 0X2 0

0 2 0 X 22 0X4 0

1 3 1 X 23 1X8 8

1 4 1 X 24 1 X 16 16

0 5 0 X 25 0 X 32 0

1 6 1 X 26 1 X 64 64

1 + 8 + 16 + 64 = (89)10

Step 2: Decimal to Octal by Repeated Division method

(89)10 (x)8

Decimal Number Operation Quotient Remainder Octal Result

89 ÷8= 11 1 1

11 ÷8= 1 3 31
1 ÷8= 0 1 131

0 Done.

(1011001)2  (131)8

1.6.7.3.2 Binary to Hexadecimal

There are two steps that are to be followed in converting a binary number to Hexadecimal number.

 First convert the Binary number to an equivalent Decimal number using Positional Notation method.
 Then convert the Decimal number to its equivalent Hexadecimal number using Repeated Division
method.
Example:

(1011001)2  (X)16

Step1: Binary to Decimal by Positional Notation method:

(1011001)2 (Y)10

Value Value of i Value X 2i

1 0 1 X 20 1X1 1

0 1 0 X 21 0X2 0

0 2 0 X 22 0X4 0

1 3 1 X 23 1X8 8

1 4 1 X 24 1 X 16 16

0 5 0 X 25 0 X 32 0

1 6 1 X 26 1 X 64 64

1 + 8 + 16 +64 = (89)10

Step 2: Decimal to Hexa Decimal by Repeated Division method

(89)10 (x)16

Decimal Number Operation Quotient Remainder Hexadecimal Result


89 ÷ 16 = 5 9 9

5 ÷ 16 = 0 5 59

0 Done.

Result (1011001)2  (59)16

1.6.7.3.3 Octal to Binary

There are two steps that are to be followed in converting an Octal number to Binary number.

 First convert the Octal number to an equivalent Decimal number using Positional Notation method.
 Then convert the Decimal number to its equivalent Binary number using Repeated Division method.

Example:

(632)8 ( ? )2

Step1: Octal to Decimal by Positional Notation method:

(632)8(Y)10

Value Value of i Value X 8i

2 0 2 X 80 2X1 2

3 1 3 X 81 3X8 24

6 2 6 X 82 6 X 64 384

2 + 24 + 384 = (410)10

Step 2: Decimal to Binary by Repeated Division method

(410)10 (X)2

Decimal Number Operation Quotient Remainder Octal Result

410 ÷2= 205 0 0

205 ÷2= 102 1 10

102 ÷2= 51 0 010


51 ÷2= 25 1 1010

25 ÷2= 12 1 11010

12 ÷2= 6 0 011010

6 ÷2= 3 0 0011010

3 ÷2= 1 1 10011010

1 ÷2= 0 1 110011010

0 Done.

Result (632)8 (110011010)2

1.6.7.3.4 Octal to Hexadecimal

There are two steps that are to be followed in converting an Octal number to Hexa Decimal number.

 First convert the Octal number to an equivalent Decimal number using Positional Notation method.
 Then convert the Decimal number to its equivalent Hexadecimal number using Repeated Division
method.
Example:

(632)8  (X)16

Step1: Octal to Decimal by Positional Notation method:

(632)8(Y)10

Value Value of i Value X 8i

2 0 2 X 80 2X1 2

3 1 3 X 81 3X8 24

6 2 6 X 82 6 X 64 384

2 + 24 + 384 = (410)10
Step 2: Decimal to Hexadecimal by Repeated Division method

(410)10 (x)16

Decimal Number Operation Quotient Remainder Octal Result

410 ÷ 16 = 25 10 A

25 ÷16 = 1 9 9

1 ÷ 16 = 0 1 19A

0 Done.

Result (632)8  (19A)16

1.6.7.3.5 Hexadecimal to Binary

There are two steps that are to be followed in converting a Hexadecimal to Binary number.

 First convert the Hexadecimal number to an equivalent Decimal number using positional notation
method.
 Then convert the Decimal number to its equivalent Binary number using repeated division method.
Example:

(2BD)16 ( X )2

Step1: Hexadecimal to Decimal by Positional Notation method:

(2BD)16(X)10

Value Value of i Value X 16i

D 0 13 X 160 13 X 1 13

B 1 11 X 161 11X 16 176

2 2 2X 162 2 X 256 512

13 + 176 + 512 = (701)10

Step 2: Decimal to Binary by Repeated Division method


(701)10 (x)2

Decimal Number Operation Quotient Remainder Octal Result

701 ÷2= 350 1 1

350 ÷2= 175 0 01

175 ÷2= 87 1 101

87 ÷2= 43 1 1101

43 ÷2= 21 1 11101

21 ÷2= 10 1 111101

10 ÷2= 5 0 0111101

5 ÷2= 2 1 10111101

2 ÷2= 1 0 010111101

1 ÷2= 0 1 1010111101

0 Done.

Result (2BD)16 (1010111101)2

1.6.7.3.6 Hexadecimal to Octal

There are two steps that are to be followed in converting a Hexadecimal to Octal number.

 First convert the Hexadecimal number to an equivalent Decimal number using Positional Notation
method.
 Then convert the Decimal number to its equivalent Octal number using Repeated Division method.
Example:

(2BD)16  (X)8

Step1: Hexadecimal to Decimal by Positional Notation method:

(2BD)16(X)10
Value Value of i Value X 16i

D 0 13 X 160 13 X 1 13

B 1 11 X 161 11X 16 176

2 2 2X 162 2 X 256 512

13 + 176 + 512 = (701)10

Step 2: Decimal to Octal by Repeated Division method

(701)10 (x)2

Decimal Number Operation Quotient Remainder Octal Result

701 ÷8= 87 5 5

87 ÷8= 10 7 75

10 ÷8= 1 2 275

1 ÷8= 0 1 1275

0 done.

Result (2BD)16  (1275)8

1.6.8 Conversion: Real Number Conversion

A real number has two parts

1. Integer part

2. Fraction part.

Example : 24.41

Integer part = 24

Fractional part = 0.41

1.6.8.1 Converting Decimal Value to Other Bases

 Integer part of the decimal value can be converted to other base B by using repeated division method.
 The fraction part of the decimal value can be converted by using the steps below.
Procedure

Step 1. Multiply the fraction part with its base value.


Step 2. Write down the integer part
Step 3. Discard the integer part.
Step 4. Repeat step1 to Step 3, till you get zero or X number of times(x is the no of digits
after the decimal point)
Step 5: The value of integer part obtained in Step 2 at each step gives the fraction part of
the converted base B number
Combine the integer part and fraction part to get the base B real number.

Note: The value of x can be chosen according to the precision. If you want two points after the decimal
point X, can be chosen as 2 or if you want five points after the decimal X, can be chosen as 5.

1.6.8.1.1 Decimal to Binary

Example 1

(15.125)10 (Y.Z)10

Y  Integer Part

Z  Fraction Part

Converting Integer Part.

(15)10 (Y)2

Decimal Number Operation Quotient Remainder Binary Result

15 ÷2= 7 1 1

7 ÷2= 3 1 11

3 ÷2= 1 1 111

1 ÷2= 0 1 1111

0 done.
(15)10  (1111)2

Converting Fraction Part.

(0.125)10 (Z)2

Fraction part Fraction part X base B Multiplied Value Integer part Binary result

0.125 0.125 X 2 = 0.250 0 0

0.250 0.250 X 2 = 0.50 0 0

0.50 0.50 X 2 = 1.0 1 001

0.0 Done

Stop

(0.125)10 (.001)2

Note: Here after the third step the fraction part became Zero and hence we stopped with 3 digits after
decimal point.

Now combining the integer part and fraction part, we get

(15.125)10  (1111.001)2

Example 2

(11.235)10 (Y.Z)2

Y  Integer Part

Z  Fraction Part

Converting Integer Part.

(11)10 (Y)2

Decimal Number Operation Quotient Remainder Binary Result

11 ÷2= 5 1 1

5 ÷2= 2 1 11

2 ÷2= 1 0 011
1 ÷2= 0 1 1011

0 Done.

(11)10  (1011)2

Converting Fraction Part.

(0.235)10 (Z)2

Fraction part Fraction part X base B Multiplied Value Integer part Binary result

0.235 0.235 X 2 = 0.470 0 0

0.470 0.470 X 2 = 0.94 0 00

0.94 0.94 X 2 = 1.88 1 001

0.88 0.88 X 2 = 1.76 1 0011

0.76 0.76 X 2 = 1.54 1 00111

Stop

(0.235)10 (.00111)2

Note: Here the value of X is chosen to be 5 and hence we stopped with 5 digits after decimal point.

Now combining the integer part and fraction part, we get

(11.235)10  (1011.00111)2

1.6.8.1.2 Decimal to Octal

Example 1

(23.078125)10 (Y.Z)8

Y  Integer Part

Z  Fraction Part
Converting Integer Part.

(23)10 (Y)8

Decimal Number Operation Quotient Remainder Octal Result

23 ÷8= 2 7 7

2 ÷8= 0 2 27

0 done.

(23)10  (27)2

Converting Fraction Part.

(0.078125)10 (Z)8

Fraction part Fraction part X base B Multiplied Value Integer part Octal result

0.078125 0.078125 X 8 = 0.625 0 0

0.625 0.625 X 8 = 5.0 5 05

0.0 Done

Stop

(0.078125)10 (.05)8

Note: Here after the Second step the fraction part became Zero and hence we stopped with 2 digits
after decimal point.

Now combining the integer part and fraction part, we get

(23.078125)10  (27.05)8

Example 2

(23.54)10 (Y.Z)8

Y  Integer Part

Z  Fraction Part
Converting Integer Part.

(23)10 (Y)8

Decimal Number Operation Quotient Remainder Octal Result

23 ÷8= 2 7 7

2 ÷8= 0 2 27

0 Done.

(23)10  (27)2

Converting Fraction Part.

(0.54)10 (Z)2

Fraction part Fraction part X base B Multiplied Value Integer part Octal result

0.54 0.54 X 8 = 4.32 4 4

0.32 0.32 X 8 = 2.56 2 42

0.56 0.56 X 8 = 4.48 4 424

0.48 0.48 X 8 = 3.84 3 3424

Stop

(0.54)10 (.3424)2

Note: Here the value of X is chosen to be 4 and hence we stopped with 4 digits after decimal point.

Now combining the integer part and fraction part, we get

(23.54)10  (27.3424)8

1.6.8.1.3 Decimal to Hexadecimal

Example 1

(163.09375)10 (Y.Z)16

YInteger Part
Z Fraction Part

Converting Integer Part.

(163)10 (Y)16

Decimal Number Operation Quotient Remainder Hexadecimal Result

163 ÷16 = 10 3 3

10 ÷16 = 0 10 A

0 Done.

(163)10  (A3)16

Converting Fraction Part.

(0.09375)10 (Z)16

Fraction part Fraction part X base B Multiplied Value Integer part Hexadecimal
result

0.09375 0.09375 X 16 = 1.5 1 1

0.5 0.5 X 16 = 8 8 18

0.0 Done

Stop

(0.09375)10 (.18)16

Note: Here after the Second step the fraction part became Zero and hence we stopped with 2 digits
after decimal point.

Now combining the integer part and fraction part, we get

(163.09375)10  (A3.18)16

Example 2

(163.48)10 (Y.Z)16
YInteger Part

Z Fraction Part

Converting Integer Part.

(163)10 (Y)16

Decimal Number Operation Quotient Remainder Hexadecimal Result

163 ÷16 = 10 3 3

10 ÷16 = 0 10 A

0 Done.

(163)10  (A3)16

Converting Fraction Part.

(0.48)10 (Z)16

Fraction part Fraction part X base B Multiplied Value Integer part Hexadecimal
result

0.48 0.48 X 16 = 7.68 7 7

0.68 0.68 X 16 = 10.88 10 7A

0.88 0.88 X 16 = 14.08 14 7AE

.08 0.08 X 16 = 1.28 1 7AE1

Stop

(0.48)10 (.7AE1)16

Note: Here the value of X is chosen to be 4 and hence we stopped with 4 digits after decimal point.

Now combining the integer part and fraction part, we get

(163.48)10  (A3.1A7E)16

1.6.8.2 Converting Other Base Value to Decimal


Both the integer part and fraction part of the other base number can be converted to Decimal number by using
positional notation method.

Formula for integer part

Formula for fraction part

Where ,

B is the base value

N is the number of digits

The only difference is that in the integer part, the value of i will be positive whereas in the fraction part the
value of i will be negative.

1.6.8.2.1 Binary to Decimal

(1111.001)2 (Y.Z)10

Integer Part : (1111)2 (Y)10

Value Value of i Value X 2i

1 0 1 X 20 1X1 1

1 1 1 X 21 1X2 2

1 2 1 X 22 1X4 4

1 3 1 X 23 1X8 8

1 +2 + 4 + 8= (15)10

Fraction Part : (.001)2 (Z)10

Value Value of i Value X 2i


0 0 1 X 2-1 1 X 0.5 0

0 1 1 X 2-2 1 X 0.25 0

1 2 1 X 2-3 1 X 0.125 1

0+0 +0.125 = (0.125)10

Combining the integer part and faction part we get

(1111.001)2 (15.125)10

1.6.8.2.2 Octal to Decimal

(27.05)8(Y.Z)10

Integer Part: (27)8(Y)10

Value Value of i Value X 8i

7 0 7 X 80 7X1 7

2 1 2 X 81 2X8 16

7 + 16 = (23)10

Fraction Part : (.05)8(Z)10

Value Value of i Value X 8i

0 0 0 X 8-1 0 X 0.125 0

5 1 5 X 8-2 5 X 0.015625 0.078125

0 + 0.078125 = (0.78125)10

Combining the integer part and faction part we get

(27.62)8  (23.078125)10

1.6.8.2.3 Hexadecimal to Decimal

(A3.18)16(Y.Z)10
Integer Part: (A3)16(Y)10

Value Value of i Value X 8i

3 0 3 X 160 3X1 3

A 1 10 X 161 10 X 16 160

160 + 3 = (163)10

Fraction Part: (.18)16(Z)10

Value Value of i Value X 2i

1 0 1 X 16-1 1 X 0.0625 0.0625

8 1 1 X 16-2 8 X 0.00390625 0.03125

0.0625 + 0.03125 = (0.09375)10

Combining the integer part and faction part we get

(A3.18)8  (163.09375)10

1.6.8.3 Converting Real Numbers From one Base to Another Base

Whenever we have to convert the value from one base to another base, first we have to convert into decimal,
then we have to convert from decimal to the other base

It can be simplified into two steps.

Step1: Convert the (real number)x into equivalent Decimal value.

Step 2: Convert the Decimal value into equivalent (Real Number)y

Example:

(25.26)7 (Y.Z)5

Step 1: (25.26)7 (Y.Z)10

Convert the (25.26)7 into equivalent decimal value.

Integer part : (25)7 (Y)10


Value Value of i Value X 8i

5 0 5 X 70 5X1 5

2 1 2 X 71 2X7 14

5 + 14 = (19)10

Fraction Part : (.26)7  (Z)10

Value Value of i Value X 8i

2 0 2 X 7-1 2 X 0.142857 0.285714

6 1 6 X 7-2 6 X 0.020408 0.122448

0.122448 + 0.285714 = (0.408162)10

Combining the integer part and faction part we get

(25.26)7 (19.408162)10

Step 2: (19.408162)10  (Y.Z)5

Convert the decimal value(19.40816210) into equivalent (real number)y

Integer part: (19)10 (Y)5

Decimal Number Operation Quotient Remainder Binary Result

19 ÷5= 3 4 4

3 ÷5= 0 3 34

0 Done.

(19)10 (34)5

Fraction Part : (0.408162)10 (Z)5

Fraction part Fraction part X base B Multiplied Value Integer part Hexa decimal
result

0.408162 0.408162 X 5 = 2.04081 2 2


0.04081 0.04081X 5 = 0.20405 0 20

0.20405 0.20405 X 5 = 1.02025 1 201

0.02025 0.02025 X 5 = 0.10125 0 2010

Stop

(0.408162)10 (0.2010)5

Combining the integer part and fraction part we get

(25.26)7 (34.2010)5

Note : Using the Above Procedure we can convert:

Binary to Octal, (Y.Z)2 (Y.Z)10 (Y.Z)8

Binary to Hexadecimal (Y.Z)2 (Y.Z)10 (Y.Z)16

Octal to Binary, (Y.Z)8 (Y.Z)10 (Y.Z)2

Octal to Hexadecimal (Y.Z)8 (Y.Z)10 (Y.Z)16

Hexadecimal to Binary (Y.Z)16 (Y.Z)10 (Y.Z)2

Hexadecimal to Octal (Y.Z)16 (Y.Z)10 (Y.Z)8

1.6.9 Shortcut Conversion between Binary, Hexadecimal and Octal

1.6.9.1 Binary to Hexadecimal


Binary to Hexadecimal

An easy way to convert from binary to hexadecimal

1. Group binary digits into sets of four, starting with the least significant (rightmost) digits.
2. If the group does not have four digits then pad zero to the left.
3. Write the corresponding hexadecimal value for each group.
Example 1:

(1110010101101101)2 = (?)16

1110 0101 0110 1101


E 5 6 D

(1110010101101101)2 = (E56D)16

Example 2:

(1011001011)2 = (?)16

0010 1100 1011

2 C B

(1011001011)2 = (2CB)16

Binary  Hexadecimal

Hexa Hexa Hexa Hexa


Binary Binary Binary Binary
decimal decimal decimal decimal

0000 0 0100 4 1000 8 1100 C

0001 1 0101 5 1001 9 1101 D

0010 2 0110 6 1010 A 1110 E

0011 3 0111 7 1011 B 1111 F

1.6.9.2 Binary to Octal


An easy way to convert from binary to octal

1. Group binary digits into sets of three, starting with the least significant (rightmost) digits.
2. If the group does not have three digits then pad zero to the left.
3. Write the corresponding octal value for each group.
Example 1:

(111001011)2 = (?)8

111 001 011

7 1 3
(111001011)2 = (713)8

Example 2:

(1110010101101101)2 = (?)8

001 110 010 101 101 101

1 6 2 5 5 5

(1110010101101101)2 = (16255)8

Note : the underlined digits are padded digits

Binary  Octal

Binar
Octal Binary Octal
y

000 0 100 4

001 1 101 5

010 2 110 6

011 3 111 7

1.6.9.3 Octal to Binary


An easy way for Converting from octal to binary

 Write down the binary equivalent(three digits) of each octal digit starting from right end and moving
towards left end
Example:

(713)8 = (?)2

7 1 3

111 001 011

(713)8 = (111001011)2

1.6.9.4 Hexadecimal to Binary


An easy way for Converting from Hexadecimal to binary

 Write down the binary equivalent (four digits) of each hexadecimal digit starting from right end and
moving towards left end.
Example

(E56D)16 = (?)2

E 5 6 D

1110 0101 0110 1101

(E56D)16 = (1110010101101101)2

1.6.9.5 Octal to Hexadecimal


Converting from octal to hexadecimal
Step 1: Convert the octal number into binary
Step2: Then convert from binary into hexadecimal.

Example:
Convert 345 octal into hex.
Step 1: (345)8 = (?)2

3 4 5
011 100 101
(345)8 = (011100101)2
Step 2: (011100101)2 = (?)16

0000 1110 0101


0 E 5
(011100101)2 =(E5)16
1.6.9.6 Hexadecimal to Octal

Converting from Hexadecimal to octal

Step 1: Convert the Hexadecimal number into binary

Step 2: then convert from binary into octal.

Example:
Convert A2DE Hexadecimal into Octal.

Step 1: (AD2E) 16 = (?)2

A D 2 E

1010 1101 0010 1110

(AD2E)16 = (1010110100101110)2

Step 2: (1010110100101110)2 = (?)8

001 010 110 100 101 110

1 2 6 4 5 6

(1010110100101110)2 = (126456)8

1.6.10 Conversion Table - Decimal, Hexadecimal, Octal, Binary

Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin
Dec

16 10 020 00010000 32 20 040 00100000 48 30 060 00110000


0 0 000 00000000
17 11 021 00010001 33 21 041 00100001 49 31 061 00110001
1 1 001 00000001
18 12 022 00010010 34 22 042 00100010 50 32 062 00110010
2 2 002 00000010
19 13 023 00010011 35 23 043 00100011 51 33 063 00110011
3 3 003 00000011
20 14 024 00010100 36 24 044 00100100 52 34 064 00110100
4 4 004 00000100
21 15 025 00010101 37 25 045 00100101 53 35 065 00110101
5 5 005 00000101
22 16 026 00010110 38 26 046 00100110 54 36 066 00110110
6 6 006 00000110
23 17 027 00010111 39 27 047 00100111 55 37 067 00110111
7 7 007 00000111
24 18 030 00011000 40 28 050 00101000 56 38 070 00111000
8 8 010 00001000
25 19 031 00011001 41 29 051 00101001 57 39 071 00111001
9 9 011 00001001
26 1A 032 00011010 42 2A 052 00101010 58 3A 072 00111010
10 A 012 00001010
27 1B 033 00011011 43 2B 053 00101011 59 3B 073 00111011
11 B 013 00001011
28 1C 034 00011100 44 2C 054 00101100 60 3C 074 00111100
12 C 014 00001100
29 1D 035 00011101 45 2D 055 00101101 61 3D 075 00111101
13 D 015 00001101
30 1E 036 00011110 46 2E 056 00101110 62 3E 076 00111110
14 E 016 00001110
31 1F 037 00011111 47 2F 057 00101111 63 3F 077 00111111
15 F 017 00001111

Dec Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin

64 40 100 01000000 80 50 120 01010000 96 60 140 01100000 112 70 160 01110000


65 41 101 01000001 81 51 121 01010001 97 61 141 01100001 113 71 161 01110001
66 42 102 01000010 82 52 122 01010010 98 62 142 01100010 114 72 162 01110010
67 43 103 01000011 83 53 123 01010011 99 63 143 01100011 115 73 163 01110011
68 44 104 01000100 84 54 124 01010100 100 64 144 01100100 116 74 164 01110100
69 45 105 01000101 85 55 125 01010101 101 65 145 01100101 117 75 165 01110101
70 46 106 01000110 86 56 126 01010110 102 66 146 01100110 118 76 166 01110110
71 47 107 01000111 87 57 127 01010111 103 67 147 01100111 119 77 167 01110111
72 48 110 01001000 88 58 130 01011000 104 68 150 01101000 120 78 170 01111000
73 49 111 01001001 89 59 131 01011001 105 69 151 01101001 121 79 171 01111001
74 4A 112 01001010 90 5A 132 01011010 106 6A 152 01101010 122 7A 172 01111010
75 4B 113 01001011 91 5B 133 01011011 107 6B 153 01101011 123 7B 173 01111011
76 4C 114 01001100 92 5C 134 01011100 108 6C 154 01101100 124 7C 174 01111100
77 4D 115 01001101 93 5D 135 01011101 109 6D 155 01101101 125 7D 175 01111101
78 4E 116 01001110 94 5E 136 01011110 110 6E 156 01101110 126 7E 176 01111110
79 4F 117 01001111 95 5F 137 01011111 111 6F 157 01101111 127 7F 177 01111111
Dec Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin

128 80 200 10000000 144 90 220 10010000 160 A0 240 10100000 176 B0 260 10110000
129 81 201 10000001 145 91 221 10010001 161 A1 241 10100001 177 B1 261 10110001
130 82 202 10000010 146 92 222 10010010 162 A2 242 10100010 178 B2 262 10110010
131 83 203 10000011 147 93 223 10010011 163 A3 243 10100011 179 B3 263 10110011
132 84 204 10000100 148 94 224 10010100 164 A4 244 10100100 180 B4 264 10110100
133 85 205 10000101 149 95 225 10010101 165 A5 245 10100101 181 B5 265 10110101
134 86 206 10000110 150 96 226 10010110 166 A6 246 10100110 182 B6 266 10110110
135 87 207 10000111 151 97 227 10010111 167 A7 247 10100111 183 B7 267 10110111
136 88 210 10001000 152 98 230 10011000 168 A8 250 10101000 184 B8 270 10111000
137 89 211 10001001 153 99 231 10011001 169 A9 251 10101001 185 B9 271 10111001
138 8A 212 10001010 154 9A 232 10011010 170 AA 252 10101010 186 BA 272 10111010
139 8B 213 10001011 155 9B 233 10011011 171 AB 253 10101011 187 BB 273 10111011
140 8C 214 10001100 156 9C 234 10011100 172 AC 254 10101100 188 BC 274 10111100
141 8D 215 10001101 157 9D 235 10011101 173 AD 255 10101101 189 BD 275 10111101
142 8E 216 10001110 158 9E 236 10011110 174 AE 256 10101110 190 BE 276 10111110
143 8F 217 10001111 159 9F 237 10011111 175 AF 257 10101111 191 BF 277 10111111

Dec Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin Dec Hex Oct Bin

192 C0 300 11000000 208 D0 320 11010000 224 E0 340 11100000 240 F0 360 11110000
193 C1 301 11000001 209 D1 321 11010001 225 E1 341 11100001 241 F1 361 11110001
194 C2 302 11000010 210 D2 322 11010010 226 E2 342 11100010 242 F2 362 11110010
195 C3 303 11000011 211 D3 323 11010011 227 E3 343 11100011 243 F3 363 11110011
196 C4 304 11000100 212 D4 324 11010100 228 E4 344 11100100 244 F4 364 11110100
197 C5 305 11000101 213 D5 325 11010101 229 E5 345 11100101 245 F5 365 11110101
198 C6 306 11000110 214 D6 326 11010110 230 E6 346 11100110 246 F6 366 11110110
199 C7 307 11000111 215 D7 327 11010111 231 E7 347 11100111 247 F7 367 11110111
200 C8 310 11001000 216 D8 330 11011000 232 E8 350 11101000 248 F8 370 11111000
201 C9 311 11001001 217 D9 331 11011001 233 E9 351 11101001 249 F9 371 11111001
202 CA 312 11001010 218 DA 332 11011010 234 EA 352 11101010 250 FA 372 11111010
203 CB 313 11001011 219 DB 333 11011011 235 EB 353 11101011 251 FB 373 11111011
204 CC 314 11001100 220 DC 334 11011100 236 EC 354 11101100 252 FC 374 11111100
205 CD 315 11001101 221 DD 335 11011101 237 ED 355 11101101 253 FD 375 11111101
206 CE 316 11001110 222 DE 336 11011110 238 EE 356 11101110 254 FE 376 11111110
207 CF 317 11001111 223 DF 337 11011111 239 EF 357 11101111 255 FF 377 11111111

1.7 Need for logical analysis and thinking


Introduction

A program consists of sequence of instructions that will be processed by the computer program to perform
the specified task. There is lot of planning and analysis that should be carried out in order to write a program.
Writing a program requires a lot of logical thinking.

Programmers follow 80-20 rule which means that in order to write 20% of coding the programmer should
plan for 80%.

Whenever programmers develop software applications, they follow an organized plan, or methodology that
breaks the process into a series of tasks. In order to write a program, the programmer should identify the
requirements of the program such as the logic, instructions and data.

Developing a program requires the following steps

1. Analyzing the Problem


2. Identifying the Logic to solve the problem
3. Identifying the instructions to apply the logic
4. Collecting the Data required to perform the instructions
5. The order of instructions in which it should be executed so that it will perform task.

Need for logical analysis and thinking

What is logic?

Logic is a just an idea or a blue print for a part of a program which consists of set of instructions to solve the
given problem. Logic of the program consists of the statements which will be then converted into
programming language statements that will be executed by the computer in order to solve the problem. The
logic for solving a problem is developed and then embedded in a program by following the rules of writing a
program.

Need for logical thinking?

Logical thinking is essential for every programmer. Anyone who is writing and learning a program should be
capable of thinking logically. Thinking logically is a key to develop programs. Every program is made up of
logics, so one should have logical thinking capability in order to develop logic for certain program.

How to think logically in Programming?

Every programmer needs to think logically in order to develop logic for a program but the problem is to find
out how to think logically. So in order to think logically we should learn how logic will work and how to
develop logic for a program. To develop logic for a program one should be capable of thinking logically. Only
a logical thinker can be capable of developing logic for a program and in turn will have the capacity to write
complex programs.

Steps to thinking logically in programming

Identifying the solution

We need to think how we can solve the problem and we need to find out a solution that will solve the
problem.

Think how you can solve the problem

Once the solutions are obtained we need to find out the ways or the methods to obtain the solution. We need
to find out the logic which defines how to solve the problem

Think how to make the computer solve the problem


Once we find the logic we should be able to use the programming concepts and convert all the logical process
into programming language statements. For this we need to know the rules and syntax of the programming
language. Then the programming language statements should be executed without any error and should obtain
the solution.

Programming logic is the primary requirements for any programmers to write efficient and effective computer
programs. Program logic is very important in writing the program and it serves as the blue print for any
program.

Every program will definitely start with program logic and end with the coding of programming language
statements.

Computer Programming – Computer programming is an activity performed by a computer programmer. It is


the process of creating logic models which is then converted into program language instructions. These
instructions are executed on the computer to perform a specific task. The goal of the program is to solve a
problem or perform a task.

Program Logic – program logic tells how to perform a specific task.

Program logic should clearly explain

• what tasks is to be done


• how the tasks is to be done
• how the tasks is to be organized
• when the tasks is to be done
• and in what sequence the tasks is to be done

It tells everything that is required to perform any task. Program logic is used by programmers to model the
programming language instructions that will be executed. Logical model of a program is a blue print for the
instructions that will be converted into programming language statements.

Programming Language Statements: program logic is just a model and it cannot be directly executed and so
we need Programming language statements. Programming language statements are used to implement
program logic by sending instructions to the operating system. Programming language statements is can be
thought of as logic developed for a particular program language.

Note: Logic models are programming language independent and so the logic can be used in any
programming languages.

Problem Solving Techniques


Problem solving techniques is a set of techniques that is use to represent the logic, which is used to
solve the given problem.
The following are the problem solving tools:
 Algorithms
 Flow chart
 Pseudo code

1.8 Algorithm

Introduction
“An algorithm is a defined as a finite sequence of step-by step instructions that performs a specific task”
Note: An algorithm usually does not solve a task, but is a sequence of steps that, if executed correctly, will give
solution to a task.
An algorithm is a set of instructions that, accepts an input, produces the result and then terminates.
There may more than one algorithm for a specific task, but each will
 Have different set of instructions
 Takes different amount of time to execute
 Require different amount of memory space.

1.8.1 Live Examples


Algorithms are used in day to day life.

Example1 : Brushing the Tooth

Step 1: Start
Step 2: Take the toothbrush & tooth paste from the brush stand
Step 3: Apply toothpaste over the toothbrush.
Step 4: Brush the tooth
Step 5: Rinse your mouth
Step 6: Place the toothbrush & tooth paste in the brush stand
Step 7: End.

Example 2: Preparing a Coffee

Step 1: Start
Step 2: Take a cup of milk
Step 3: Pour the milk into a vessel.
Step 4: Keep the vessel on the stove.
Step 5: Turn on the stove.
Step 6: Allow it boil.
Step 7: Add required coffee powder and sugar.
Step 8: Turn off the stove after boiling.
Step 9: Pour the content of the vessel into the cup.
Step 10: Stop.

Algorithms are used in day to day life.

1.8.2 Properties of an Algorithm

 Unambiguous – the instructions should be clearly understood without any confusions


 Executable – the instruction should be easily converted into code without any additional information.
 Ordered – the steps of an algorithm must be ordered in a proper sequence.
 Finite - an algorithm should terminate at some stage

1.8.3 Characteristics of a Good Algorithm

As it is said earlier different algorithms may perform task, but we have to choose the best algorithm. The
characteristics of a good algorithm are as follows.
 It should do the given task accurately without any errors.
 It should require minimum computer memory.
 The time taken to perform the given task should be as minimum as possible.

1.8.4 Examples

An example algorithm to add two numbers


Step 1: Start
Step 2: Read two numbers, num1 & num2.
Step 3: Add the value of num1 & num2
Step 4: Store the result in sum
Step 5: Display the sum
Step 6: End

1.9 Flow Charts

“The flow chart can be defined as the pictorial representation of the algorithm”
The flowchart is a means of visually presenting the flow of data. The steps are represented in the form of
different shapes and flow lines are used to interconnect each step.
Usually an architect will have a blue print before starting construction of a building. Similarly, a programmer
will like to have a flowchart before writing a computer program.
The flowchart is drawn according to some defined rules and standard flowchart symbols prescribed by the
American National Standard Institute, Inc.

1.9.1 Introduction

 A flow chart is a graphical or symbolic representation of a process.


 Each step in the process is represented by a symbol.
 The flow chart symbols are linked together with arrows or interconnecting lines depicting the process
flow direction.
 These flowcharts play an important role in the programming and are quite useful in understanding the
logic of complicated and lengthy problems.
 Once the flowchart is drawn, it becomes easy to write the program in any high level language.
Flowcharts are usually drawn using some standard symbols. Some standard symbols, which are frequently used
to draw a flow chart, are:

1.9.2 Guidelines for Drawing a Flowchart

The following are some guidelines for drawing a flowchart:


(a) All the process should be listed out in logical order.
(b) The flowchart should be clear, neat and easy to follow. It should be unambiguous.
(c) Direction of the flow of a process should be is from left to right or top to bottom.
(d) Only one flow line should come out from a process symbol.
(e) Similarly only one flow line should enter a decision symbol, but two or three flow lines, can leave
the decision symbol.

(f) Only one flow line should be used with terminal symbol.

(g) Using the annotation symbol describe the data or computational steps more clearly, if needed.

(h) If the flowchart becomes complex, use connector symbols to reduce the number of flow lines.
(i) Avoid the intersection of flow lines.
(j) Ensure that the flowchart has a logical start and finish.
(k) The validity of the flowchart should be tested by passing through it a sample test data.

1.9.3 Advantages of Using Flowcharts

The benefits of flowcharts are as follows:


1. Clear representation: Flowcharts are better way of diagrammatically representing the logic of the program.
The flow of execution of the program can be easily identified by the flow chart.
2. Easy understanding: The flow chart can be easily understood by anyone who does not know anything about
the programming.
3. Proper documentation: flowcharts serve as good program documentation.
4. Efficient Coding: The flowcharts act as a guide or blueprint and so coding can be done effectively done
using flowchart.
5. Proper Debugging: Errors can be easily spotted in a flowchart and so it helps in debugging process.

1.9.4 Limitations of Using Flowcharts

1. Complex logic: if the program is lengthy and the logic is complicated, then drawing the flowchart becomes
complex.
2. Alterations and Modifications: If any alterations or modifications are to be done, then the entire flowchart
should be re-drawn completely.
3. Difficult to draw: The flowchart symbols are quite difficult to draw and it consumes more time.

1.9.5 Examples

Flow chart to find if a number is odd/even. Fig-4

1.10 Pseudocode

Pseudo code is a popular way of representing the algorithms


Pseudo means imitation and code means program. So pseudo code can be called as imitation of a program.
Pseudo code is actually not a program, but it looks very similar to the program.
 Pseudo code has been chosen as the primary method of representing an algorithm.
 It is easy to read and write.
 It looks like the high-level computer languages.
 The significance of the pseudo code is that it is written in a language similar to the one used for
implementation
The common characteristics of pseudocode:
o Statements are written in simple English
o Instructions are written line by line.
o Keywords are used
o indentation are used to signify control structures
o Each set of instructions is written from top to bottom
o Groups of statements may be formed into modules, and the module given a name

1.10.1 Introduction

1.10.2 Reasons for Using Pseudocode

There are two main reasons for using pseudo code


 Pseudo code is programming language neutral and is suitable for any programming language.
 It can be reused without modifications for any programming language.

1.10.3 Advantages of Using Pseudo code

 It can be written easily in any word processor.


 It can be easily modified whenever required.
 It is very useful for structured programming.
 It can be read and understood easily.
 Converting a pseudocode to programming language is very easy

1.10.4 Disadvantages of Using Pseudo code

 Create an additional overhead of maintaining the document.


 It is not visual and clear picture of the logic of the program will not be obtained.
 A normal user cannot understand pseudo code easily.

1.10.5 Rules for Pseudocode

Rule 1: Write only one stmt per line

Rule 2: proper Indentation should be given to show hierarchy of control structures (i.e. when you are
writing statements within a loop or branch, you should leave a tab space at the beginning of each statement)

Example:
while(condition)
do action1 Proper
do action 2
Indentation
do action 3
END while

Rule 3: End multiline structures properly (i.e every looping or branching control structure should end with a
END keyword )

Example:
while(condition)
do action1
do action 2 End of
do action 3 while Loop
END while

Rule 4: Keep Statements Language Independent (i.e. the keyword that are being used in the pseudo code
should not be specific to any programming language)

General Syntax Used in Pseudoocode


1. INPUT – Read, Get, Input, Obtain
2. OUTPUT – write, print, display
3. COMPUTATION – determine, calculate, find, compute
4. INITIALIZE – set, initialize, assign

1.10.6 Examples

Problem: Sum of 2 Numbers


PseudoCode
READ m,n.
INITIALIZE sum to 0
ADD m with n
STORE the result in c
WRITE c
STOP

1.10.7 Comparison of Algorithm, Flowchart and Pseudocode

Parameters Algorithm Flow chart Pseudocode

Representation Simple English Graphical representation with English language


with some
language symbols and flow lines
keywords

It gives just a basic


It is a blue-print of the It is almost a
Nature idea about the
program. program.
program

Only who knows a


Anyone who knows the
Anyone can little bit
Understandability standard symbols of flowchart
understand programming can
can understand
understand

Cost and Simple and easy to Simple and easy to


Difficult to draw flowchart
overhead write write

It is difficult to modify because


Can be easily Can be easily
Modification the flow chart has to be re-
modified modified
drawn once again

Flow of the program is easily


Flow of the Flow of the
Flow of the identified because every flow
program is not program is not
program of the program is represented
easily identified easily identified
by flow lines.

Not Suitable for lengthy and


Suitable for even complex logic. Because Suitable for even
Portability lengthy and drawing a flowchart for a lengthy and
complex logic complex logic that spans many complex logic
pages is an overhead.

It is not time It is not time


Time It is time consuming
consuming consuming

It cannot be easily
Code It cannot be easily converted It can be easily
converted into
Convertibility into code. converted into code.
code.

1.10.8 Example of Algorithm Flowchart and Psudocode


Example-1
Problem : Sum of two numbers
Algorithm
Step 1: Start
Step 2: Read two numbers, num1 & num2.
Step 3: Add the value of num1 & num2
Step 4: Store the result in sum
Step 5: Display the sum
Step 6: End

Psudocode
READ m,n.
INITIALIZE sum to 0
CALCULATE C= m + n
WRITE c
STOP

Example-2
Problem : Average of three Numbers

Algorithm
Step 1: Start
Step 2: Read three numbers, num1, num2 and num3.
Step 3: Add the value of num1, num2 and num3
Step 4: Store the result in sum
Step 5: Find the average as (avg=num/3)
Step 6: Display the average
Step 7: End

Psudocode
READ a, b, c.
CALCULATE avg= (a + b + c )/3
WRITE avg
STOP

Example-3
Problem : Area and circumference of a circle

Algorithm
Step 1: Start
Step 2: Read the value of radius.
Step 3: Set the value of pi = 3.14
Step 4: Find the area as (area=pi*radius*radius)
Step 5: Find the circumference as (circum = 2*pi*radius)
Step 6: Display the area and circumference
Step 7: End

Psudocode
READ radius.
ASSIGN pi =3.14
CALCULATE area= pi*radius*radius
CALCULATE circum= 2*pi*radius
WRITE avg
STOP

Example-4
Problem : Area of a triangle

Algorithm
Step 1: Start
Step 2: Read the value of base and height.
Step 3: Find the area as (area= (1/2)*base*height)
Step 4: Display the area
Step 5: End

Psudocode
Read base, height.
Calculate area= 1/2*base*height
Write area
Stop

Example-5
Problem : Swapping using temporary variable
Algorithm
Step 1: Start
Step 2: Read the values of a and b.
Step 3: Assign the value of a to temp
Step 4: Assign the value of b to a
Step 5: Assign the value of temp to b
Step 6: Display the swapped values of a and b
Step 7: End

Psudocode
READ a, b
temp = a
a=b
b = temp
WRITE a, b
STOP

Example-6
Problem : Swapping without using temporary variable

Algorithm
Step 1: Start
Step 2: Read the values of a and b.
Step 3: Assign the value of a + b to a
Step 4: Assign the value of a - b to b
Step 5: Assign the value of a – b to a
Step 6: Display the swapped values of a and b
Step 7: End

Psudocode
READ a, b
a= a + b
b =a - b
b=a+b
WRITE a, b
STOP

Example-7
Problem : Find the square and cube of a number
Algorithm
Step 1: Start
Step 2: Read a number num1.
Step 3: Find the square of number as (square = pow(num,2))
Step 4: Find the cube of number as (cube= pow(num,3))
Step 5: Display the values of square and cube
Step 6: End

Psudocode
READ num
CALCULATE square = pow(num,2)
CALCULATE cube = pow(num,3)
WRITE square, cube
STOP

Example-8
Problem : Find Positive/Negative
Algorithm
Step 1: start
Step 2: read a number num.
Step 3: IF num is GREATER THAN OR EQUAL to 0 THEN
Display “the number is POSITIVE”.
ELSE
Display “the number is NEGATIVE”.
Step 4: End

Psudocode
READ num
IF (num >= 0) THEN
PRINT “positive”
ELSE
PRINT “positive”
END IF
STOP

Example-9
Problem : Biggest among two numbers
Algorithm
Step 1: Start
Step 2: Read two numbers num1, num2.
Step 3: IF num 1 is GREATER THAN num2
Display “the num1 is GREATER”.
ELSE IF num is EQUAL to 0 THEN
Display “the num1 is Equal to num2”.
ELSE num1 is LESSER THAN num2
Display “the num2 is GREATER”.
Step 4: End

Psudocode
READ num1, num2
IF (num 1 > num2) THEN
PRINT “num1 is greater”
ELSE
IF (num1 < num2) THEN
PRINT “num2 is greater”
ELSE
PRINT “num 1 is equal to num2”
END IF
END IF
STOP

Example-10
Problem : Find Odd/Even
Algorithm
Step 1: Start
Step 2: Read a number num.
Step 3: Find the value of remainder as (remainder=num%2)
Step 4: IF remainder is EQUAL to 0 THEN
Display “the number is EVEN”.
ELSE
Display “the number is ODD”.
Step 5: End

Psudocode
READ num
IF (num%2 == 0) THEN
PRINT “num is odd”
ELSE
PRINT “num is even”
END IF
STOP

Example-11
Problem : A simple Calculator
Algorithm
Step 1: Start
Step 2: Read two numbers num1 and num2.
Step 3: Read a character op (+, -, *, /)
Step 4: IF OP is EQUAL to ‘+’ THEN
BEGIN:
Result = num1 + num2.
Display the result
END
ELSE IF OP is EQUAL to ‘-’ THEN
BEGIN:
Result = num1 - num2.
Display the result
END:
ELSE IF OP is EQUAL to ‘*’ THEN
BEGIN:
Result = num1 * num2.
Display the result
END:
ELSE IF OP is EQUAL to ‘/’ THEN
BEGIN:
Result = num1 / num2.
Display the result
END:
Step 5: End

Psudocode
READ num1, num2
READ operator
CASE operator
CASE ‘+’:
Result = num1 + num2.
PRINT Result
CASE ‘-’:
Result = num1 - num2.
PRINT Result
CASE ‘*’:
Result = num1 * num2.
PRINT Result
CASE ‘/’:
Result = num1 / num2.
PRINT Result
END CASE
STOP

Example-12
Problem : Smallest among three numbers

Algorithm
Step 1: Start
Step 2: Read three numbers num1, num2 and num3.
Step 3: IF num1 is LESS THAN num2
BEGIN:
IF num1 is LESS THAN num3
Display “num1 is smallest”
ELSE IF num2 is LESS THAN num3
Display “num2 is smallest”
ELSE
Display “num3 is smallest”
END:
Step 4: End

Psudocode
READ a, b, c
IF (a < b) THEN
IF (a < c) THEN
PRINT “a is smallest”
END IF
ELSE
IF (b < C) THEN
PRINT “b is smallest”
ELSE
PRINT “c is smallest”
END IF
END IF
STOP

Example-13
Problem : Printing 1 to N

Algorithm
Step 1: Start
Step 2: Read the value of N.
Step 3: Initialize count to 0
Step 4: IF count is GREATER than N then go to step 5
BEGIN:
Display the Value of count.
Increment the value of count
END:
Step 5: End

Psudocode
READ N
INITIALIZE count =1
WHILE (count <= N)
Count =count +1
PRINT count
END WHILE
STOP

Example-14
Problem : Sum of N numbers

Algorithm
Step 1: Start
Step 2: Read the value of N.
Step 3: Initialize count and sum to 0
Step 4: IF count is GREATER than N then go to step 5
BEGIN:
Calculate sum as (sum = sum + count).
Increment the value of count
END:
Step 5: Display the sum
Step 6: End

Psudocode
READ N
INITIALIZE count =1
INITIALIZE sum =0
WHILE (count <=N)
Count =count +1
sum = sum + count
END WHILE
WRITE sum
STOP

Example-15
Problem : Generating Fibonacci Series

Algorithm
Step 1: Start
Step 2: Read the value of N.
Step 3: Initialize f1=0, f2 =1 and Count =2
Step 4: Display f1, f2
Step 5: IF count is GREATER than N then go to step 6
BEGIN:
Calculate f3 as (f3= f1+ f2)
Assign the value of f2 to f1
Assign the value of f3 to f2
Increment the value of count
Display f3
END:
Step 6: End

Psudocode
READ N
INITIALIZE f1 = 0, f2 = 1
PRINT f1, f2
INITIALIZE sum = 0
INITIALIZE count =2
WHILE (count <N)
CALCULATE f3 = f1 + f2
PRINT f3
f1 = f2
f2 = f3
Count =count +1
END WHILE
STOP

Example-16
Problem : Factorial of a given number

Algorithm
Step 1: Start
Step 2: Read the value of N.
Step 3: Initialize fact =1 and Count =0
Step 4: IF count is GREATER than N then go to step 5
BEGIN:
Calculate fact as (fact= fact* count)
Increment the value of count
END
Step 5: Display the value of fact
Step 6: End

Psudocode
READ N
INITIALIZE fact = 1
INITIALIZE count = 0
WHILE (count <N)
CALCULATE fact = fact * count
Count =count +1
END WHILE
WRITE fact
STOP
Example-17
Problem : Sum of Digits

Algorithm
Step 1: Start
Step 2: Read a Number num.
Step 3: Initialize sum=0
Step 4: IF num is NOT GREATER THAN 0 then go to step 5
BEGIN:
Calculate remainder as (remainder= num%10)
Calculate sum as (sum= sum + remainder)
Calculate num as (num= num/10)
END
Step 5: Display the value of sum
Step 6: End

Psudocode
READ num
INITIALIZE sum = 0
WHILE (num > 0)
CALCULATE rem= num % 10
CALCULATE sum= sum + rem
num= num/10
END WHILE
WRITE sum
STOP

Example-18
Problem : Find reverse of a number

Algorithm
Step 1: start
Step 2: read a Number num.
Step 3: initialize rev=0
Step 4: IF num is NOT GREATER THAN 0 then go to step 5
BEGIN:
Calculate remainder as (remainder= num%10)
Calculate rev as (rev= rev*10 + remainder)
Calculate num as (num= num/10)
END
Step 5: display the value of sum
Step 6: End

Psudocode
READ num
INITIALIZE rev = 0
WHILE (num > 0)
CALCULATE remainder= num%10
CALCULATE rev= rev*10 + remainder
CALCULATE num= num/10
END WHILE
WRITE rev
STOP

Example-19
Problem : Generating the series(1 + x + x2 + ……… + xn)

Algorithm
Step 1: Start
Step 2: Read the value of x and n.
Step 3: Initialize sum=0 and count =0.
Step 4: IF count is EQUAL to n then go to step 5
BEGIN:
Calculate sum as (sum= sum + pow(x,count))
END
Step 5: Display the value of sum
Step 6: End

Psudocode
READ X, N
INITIALIZE sum = 0
INITIALIZE count= 0
WHILE (count <= N)
CALCULATE sum = sum + pow(x, ount)
END WHILE
WRITE sum
STOP

Example-20
Problem : String Palindrome

Algorithm
Step 1: Start
Step 2: Read a string
Step3: Reverse the string using strrev function
Step 3: Compare the string and the reversed using strcmp function.
Step 4: IF string and reversed string are equal
Display “palindrome”
ELSE
Display “ not palindrome”
Step 5: End

Psudocode
READ string
String1 = strrev(string)
Compare = strcmp(string,string1)
IF (compare == 0)
PRINT “palindrome”
ELSE
PRINT “not palindrome”
STOP

Appendix – I (Components of Computers)


Introduction

 A computer system consists of both hardware and software. Information stored on computer hardware
is often called software.

 The hardware components of a computer system are the electronic and mechanical parts.

 The software components of a computer system are the data and the computer programs.

The major hardware components of a computer system are:

 Processor (CPU)

 Main memory (Storage device)

 Secondary memory (Storage device)

 Input devices

 Output devices
For typical desktop computers, the processor, main memory,
secondary memory, power supply, and supporting hardware are System Unit
housed in a metal case called System Unit.

 Many of the components are connected to the main


circuit board of the computer, called the motherboard.

 The power supply supplies power for most of the


components.

Processor (CPU)

 The Central Processing Unit (CPU) is responsible for


interpreting and executing most of the commands from
the computer's hardware and software.

 The CPU could be considered the "brains" of the computer.

 The CPU is Also Known As


processor, computer processor,
microprocessor, central processor, "the
brains of the computer".

 Popular CPU Manufacturers: Intel,


AMD

Storage device

Alternatively referred to as storage, storage


media, or storage medium, a storage device is
a hardware device capable of holding information.

There are two storage devices used in computers

 Primary (RAM) – Volatile Memory

 Secondary (Floppy, CD, DVD, Pen Drive, Hard disk) – Non Voltatile Memory

PRIMARY MEMEORY

RAM (Random Access Memory)

 Main Memory is a form of Immediate Access Storage also known as primary storage, it is volatile
memory.
 Very closely connected to the processor.

 The contents are quickly and easily changed.

 Holds the programs and data that the processor is actively working with.

 Interacts with the processor millions of times per second.

 Popular RAM Manufacturers: Kingston, ValueRAM

SECONDARY MEMORY

 Connected to main memory through the bus


and a controller.

 The contents are easily changed, but this is


very slow compared to main memory.

 Used for long-term storage of programs and


data.

 The processor only occasionally interacts


with secondary memory.

Floppy

 Floppy is an secondary storage device.

 Floppy disk drives store information on


floppy disks, also called floppies or
diskettes.

 Floppy disks are slower to access than


hard disks and have less storage
capacity, but they are much less
expensive. And most importantly, they
are portable.

CD / DVD Drive

 Short for Compact Disk, CD drives or


optical drives

 Nearly all computers today come equipped with a CD or DVD drive, usually located on the front of
the system unit.
 CD drives use lasers to read (retrieve) data from a CD, and many CD drives can also write (record)
data onto CDs.

 If you have a recordable disk drive, you


can store copies of your files on blank
CDs. You can also use a CD drive to play
music CDs on your computer.

 DVD drives can do everything that CD


drives can, plus read DVDs.

 Popular CD/DVD Manufacturers: SONY, LG

Hard Disk Drive

 Alternatively referred to as a hard disk drive and abbreviated as HD or HDD, the hard drive is the
computer's main storage media device that permanently stores all data on the computer.

 A hard drive is a mass storage device found in all PCs (with some exclusions) that is used to store
permanent data such as the operating system, programs and user
files.

 The data on hard drives can be erased and/or


overwritten; the hard drive is classed as a non-
volatile storage device.

 Popular HDD Manufacturers: Seagate, Western


Digital (WD)

USB (Universal Serial Bus)

 A USB drive also known as a flash drive.

 It is a plug-and-play portable storage device that


uses flash memory and is lightweight

 It’s non-volatile random-access memory

 Popular CD/DVD Manufacturers: SONY, LG, SanDisk

INPUT DEVICES

 Input and output devices allow the computer system to interact with the outside world by moving data
into and out of the system.

 An input device is used to bring data into the


system. Some input devices are:

o Keyboard

o Mouse

o Scanner

o Web Camera

o Microphone

o Bar code reader

o Light Pen

o Joystick

Keyboard

 This is most commonly used device which acts as input device.

 Its structure is like typewriter. It contains no. of keys which have some specific ASCII values. Like
‘A’ has ASCII value 65.

 When this is pressed , it is converted into 65 & this 65 is sent to CPU in the form of Binary language
(i.e. 1000001). Then operations are done on this data.

Mouse

 A mouse is a small device used to point to and select items on your computer screen.
Mouse Pointer

 Advantages

o Easy to use

o Not very expensive

o Moves the cursor faster than the arrow keys of keyboard.


 A mouse may contain two or three buttons.
Now a day's optical mouse is very popular.

 Primary Button is used to left click and secondary button used to right click

 Pointing and clicking with your mouse is the main way to interact with your computer.

Scanner

 A scanner is an input device that scans documents such as photographs and pages of text. When a
document is scanned, it is converted into a digital format.

 Most scanners are flatbed devices, which mean they have a flat scanning surface.

 Another type of scanner is a sheet-fed scanner, which can only accept paper documents.

Web Camera

 The term webcam is a combination of "Web" and "video camera."

 The purpose of a webcam is, not


surprisingly, to broadcast video on the
Web.

 Webcams are typically small cameras that


either attach to a user's monitor or sit on a
desk.

 Most webcams connect to the computer


via USB, though some use a Fire wire
connection.

Microphone

 Microphone is an input device to input sound that is then stored in digital form.

 The microphone is used for various applications like


adding sound to a multimedia presentation or for mixing
music.

Bar Code Reader

 Bar Code Reader is a device used for reading bar coded


data (data in form of light and dark lines).
 Bar coded data is generally used in labeling goods,
numbering the books etc.

 It may be a hand held scanner or may be embedded in a


stationary scanner.

 Bar Code Reader scans a bar code image, converts it


into an alphanumeric value which is then fed to the
computer to which bar code reader is connected.

Light Pen

 Light pen is a pointing device which is similar to a pen. It is used


to select a displayed menu item or draw pictures on the monitor
screen. It consists of a photocell and an optical system placed in a
small tube.

 When light pen's tip is moved over the monitor screen and pen
button is pressed, its photocell sensing
element detects the screen location and
sends the corresponding signal to the
CPU.

Joystick

 Joystick is also a pointing device which is


used to move cursor position on a monitor
screen.

 It is a stick having a spherical ball at its


both lower and upper ends.

 The lower spherical ball moves in a socket.TheJoystic can be moved in all four directions.

 The function of joystick is similar to that of a


mouse. It is mainly used in Computer Aided
Designing (CAD) and playing computer
games.

Touch Screen

 A touch screen is a display that also serves as


an input device.
 Some touch screens require a proprietary pen for input, though most modern touch screens detect
human touch.

 Since touch screen devices accept input directly through the screen, they do not require external input
devices, such as mice and keyboards

OUTPUT DEVICES

 The devices which are used to display the data to the user either in the form of hard copy or soft copy
are called output devices.

 An output device is used to bring data


into the system. Some output devices
are:

o Monitor

o Printer

o Speaker

o Projector

o Plotter

Monitor

 A monitor is also called as video


display terminal (VDT).

 It is used to get the data in the


form of soft copy. Their
functioning is exactly similar to
the television.

 The visual display of the LCD Monitor (Left); CRT Monitor (Right)
processed data, which the users can view is got through the monitor.

 Computer monitors come in a variety of screen sizes and not to forget visual resolutions.

 There are two kinds of viewing screen used for monitors.

o Cathode-Ray Tube (CRT)

o Flat- Panel Display


Printer

 The next of the computer output devices is the printer, which is an external hardware device, which
takes processed data from the computer to generate a hard copy of the data.
Inkjet Printer (Left); Laser Printer (Right)
 There are two types of printers

o Impact Printers

o Non-Impact Printers

Speaker

 A speaker is a hardware device that is connected to a computer's sound card, which outputs the sound
generated by the card.

 Audio data generated by the computer is sent to the


audio card that is located in the expansion slot.

 The card translates the data into audio signals, which


are then sent to either the speakers or the headphones.

Projector

 It is a hardware device, with which an image like a computer screen is projected onto a flat screen.

 Image data is sent to the video card, by the computer which is then
translated into a video image and sent to the projector.

 A projector is often used in meetings or to make presentations,


because they allow for a large image to be shown, with which the
display is available for a large audience.

Plotter

 Plotters, like printers, create a hard copy rendition of a digitally rendered design.

 The design is sent to a plotter through a graphics card and the image is created using a pen.

 In simple words, plotters basically draw an image using a series of straight lines.

 This computer output device is used with engineering applications.

Note: Modems, Network Cards and Touch Screen can act as both input device and output device.
Volatile Memory: The data is lost on reboot. This is the ram 3
memory. Random-access-memory.
Non-Volatile Memory: The data is saved to a hard drive or flash
drive, or it could be a hard coded chip. This is ROM memory.
Read-only-memory.

Appendix – II (Application of Computers)

Business

The characteristics of a computer such as high speed of calculation, diligence, accuracy, reliability, or
versatility has made it a vital part in all business organizations.

Computers are used in business organization for:

 Payroll Calculations

 Budgeting

 Sales Analysis

 Financial forecasting

 Managing employees database

 Maintenance of stocks etc.

Banking

Today Banking is almost totally dependent on computer.

Banks provide following facilities:

 Banks on-line accounting facility, which includes maintaining account balances, deposits, withdraw,
interest charges, shares and trustee records.

 ATM machines are making it even easier for customers to do transaction with banks.

Insurance

Insurance companies are keeping all records up to date with the help of a computer. The Insurance
Companies, Finance houses and Stock broking firms are widely using computers for their concerns.
Insurance Companies are maintaining a database of all clients with the information such as

 how to continue with policies

 starting date of the policies

 next due installment of a policy

 maturity date

 interests due

 survival benefits

 bonus

Education

The computer has provided a lot of facilities in the Education System.

 The uses of computer provide a tool in the Education system is known as CBE (Computer Based
Education).

 CBE involves Control, Delivery and Evaluation of learning.

 The computer education is very familiar and rapidly increasing the graph of computer students.

 There are number of methods in which educational institutions can use computer to educate the
students effectively.

 It is used for preparing a database about student performance and analysis are carried out based on the
performance.

Marketing

In Marketing uses of computer are following:

 Advertising: With computers, advertising professionals create art and graphics, print and disseminate
ads with the goal of selling more products.

 At Home Shopping: At home shopping has been made possible through use of computerized
catalogues that provide access to product information and permit purchase of products from home.

Health Care

Computers have become important part in all Medical Systems.

The computers are being used in hospitals to keep the record of patients and medicines. It is also used in
scanning and diagnosing different diseases. ECG, EEG, Ultrasounds and CT Scans etc. are also done by
computerized machines.

Some of major fields of health care in which computer are used:

 Diagnostic System: Computers are used to collect data and identify cause of illness.

 Lab-diagnostic System: All tests can be done and reports can be prepared by computer.

 Patient Monitoring System: These are used to check patient's signs for abnormality such as in
Cardiac Arrest, ECG etc.

 Pharmacy Information System: Computer checks Drug-Labels, Expiry dates, harmful drug side
effects etc.

 Nowadays, computers are also used in performing surgery.

Engineering Design

Computers are widely used in Engineering purposes.

One of major areas is CAD (Computer aided design).CAD provides creation, edition, and modification of
designs and image. Some fields are:

 Structural Engineering: Requires stress and strain analysis required for design of Ships, Buildings,
bridges, Airplanes etc.

 Industrial Engineering: Computers deals with design, implementation and improvement of


integrated systems of people, materials and equipments.

 Architectural Engineering: Computers help in planning towns, designing buildings, determining a


how buildings look on a site using both 2D and 3D drawings.

Military

Computers are largely used in defense. Modern tanks, missiles, weapons etc. are computerized control
systems.

Some military areas where a computer has been used are:

 Missile Control

 Military Communication

 Military operation and planning

 Smart Weapons

Communication
Communication means to convey a message, an idea, a picture or speech that is received and understood
clearly and correctly by the person for whom it is meant.

Important areas in this category are:

 E-mail

 Chatting

 Usenet

 FTP

 Telnet

 Video-conferencing

Government Applications

Computers play an important role in government applications.

Some major fields in this category are:

 Budgets

 Sales tax department

 Income tax department

 Statistical data

 Computerization of voters lists

 Computerization of Driving Licensing system

 Computerization of PAN card

 Weather Forecasting.

You might also like