Beruflich Dokumente
Kultur Dokumente
Based on,
Operating Principle (or) Functionality
Size (or) Capacity
Applications (or) Purpose
Point2:
Based on Operating Principle (or) Functionality
It is further classified into
Analog Computer
Digital Computer
Hybrid Computer
Analog Computer
An analog computer is a form of computer that uses continuous physical phenomena such as
electrical, mechanical, or hydraulic quantities to model the problem being solved
Computers that measure changing conditions like temperature, pressure etc. and convert the
numerical into quantities within a range are called Analog Computer
Analog Computers are employed for specific scientific/ technological operations
Digital Computer
A computer that performs calculations and logical operations with quantities represented as
digits, usually in the binary number system
A digital computer can give precise and measurable results.
The digital computers applications are universal, i.e., from science to business to
administration and others.
For that reasons, these are very popular now-a-days.
Point3:
Based on Size or Capacity
It is further classified into
Micro-computers
Mini-computers\
Mainframes
Super computers
1. Micro computers
A micro computer contains Micro processor, a CPU on a single silicon chip i.e., 8088, 8086
etc. It has limited internal memory and is relatively slow.
Its rate of acceptance and transfer of data is a maximum of 5 lake bytes/second.
It is small, portable, inexpensive occupies less space and consumes very less power.
Personal Computers (PC) are the best example of this kind.
Desktop Computer: a personal or micro-mini computer sufficient to fit on a desk.
Laptop Computer: a portable computer complete with an integrated screen and keyboard. It is
generally smaller in size than a desktop computer and larger than a notebook computer.
Palmtop Computer/Digital Diary /Notebook /PDAs: a hand-sized computer. Palmtops have
no keyboard but the screen serves both as an input and output device.
2. Mini computers
A mini computer is bigger than a micro-computer and smaller than a mainframe.
It has a medium speed processor; more internal memory capacity compared to micros and
can support all high level languages.
It can perform most tasks that a mainframe can do.
In general, a minicomputer is a multiprocessing system capable of supporting from 4 to about
200 users simultaneously.
3. Mainframes
These are huge machines with high speed configured with host processor and subordinate
processors.
They have large internal storage capacity i.e., about 10 mega words and support greater than
200 remote terminals.
They are able to accept any high level language. But their main drawbacks are, very high
cost, requirement of large space, very high electricity consumption, and high cost of
maintenance.
Their main uses are at government offices and research institutions.
4. Super computers
Supercomputers are more powerful than mainframes and can process several hundreds or
even thousands million instructions per second.
They are designed for high precision based application and have vast processing power
applied in a narrow range.
They are mostly used in research centers, complicated military and scientific jobs such as
weather forecasting, cracking of enemy codes, predicting how a nuclear bomb will explode
and designing missiles and jet fighters.
Point4:
Based on Application or Purpose
It is further classified into
General purpose
Specific purpose
1. General Purpose
2. Special Purpose
A computer can process data, pictures, sound and graphics. They can solve highly complicated
problems quickly and accurately.
Input Unit:
Computers need to receive data and instruction in order to solve any problem. Therefore we
need to input the data and instructions into the computers.
The input unit consists of one or more input devices. Keyboard is the one of the most
commonly used input device.
Other commonly used input devices are the mouse, floppy disk drive, magnetic tape, etc.
All the input devices perform the following functions.
o Accept the data and instructions from the outside world.
o Convert it to a form that the computer can understand.
o Supply the converted data to the computer system for further processing.
Storage Unit:
The storage unit of the computer holds data and instructions that are entered through the
input unit, before they are processed.
It preserves the intermediate and final results before these are sent to the output devices. It
also saves the data for the later use.
Types of Storage Devices:
1. Primary Storage:
1. Stores and provides very fast.
2. This memory is generally used to hold the program being currently executed in the
computer, the data being received from the input unit, the intermediate and final results of
the program.
3. The primary memory is temporary in nature. The data is lost, when the computer is
switched off.
4. In order to store the data permanently, the data has to be transferred to the secondary
memory. The cost of the primary storage is more compared to the secondary storage.
2. Secondary Storage:
1. It stores several programs, documents, data bases etc.
2. The programs that run on the computer are first transferred to the primary memory
before it is actually run.
3. Whenever the results are saved, again they get stored in the secondary memory.
4. The secondary memory is slower and cheaper than the primary memory. Some of the
commonly used secondary memory devices are Hard disk, CD, etc.,
Memory Size:
All digital computers use the binary system, i.e. 0s and 1s.
Each character or a number is represented by an 8 bit code.
The set of 8 bits is called a byte. A Character occupies 1 byte space.
A numeric occupies 2 byte space. Byte is the space occupied in the memory.
The size of the primary storage is specified in KB (Kilobytes) or MB (Megabyte).
One KB is equal to 1024 bytes and one MB is equal to 1000KB.
The size of the primary storage in a typical PC usually starts at 16MB. PCs having 32 MB,
48MB, 128 MB, 256MB memory are quite common.
Output Unit:
The output unit of a computer provides the information and results of a computation to
outside world. Printers, Visual Display Unit (VDU) are the commonly used output devices.
Other commonly used output devices are floppy disk drive, hard disk drive, and magnetic
tape drive.
Central Processing Unit:
The control unit and ALU of the computer are together known as the Central Processing Unit
(CPU).
The CPU is like brain performs the following functions:
o It performs all calculations.
o It takes all decisions.
o It controls all units of the computer.
A PC may have CPU-IC such as Intel 8088, 80286, 80386, 80486, Celeron, Pentium,
Pentium Pro, Pentium II, Pentium III, Pentium IV, Dual Core, and AMD etc.
Control Unit:
o It controls all other units in the computer. The control unit instructs the input unit, where to
store the data after receiving it from the user.
o It controls the flow of data and instructions from the storage unit to ALU. It also controls the
flow of results from the ALU to the storage unit.
o The control unit is generally referred as the central nervous system of the computer that
control and synchronizes its working.
When we type some letters or words, the computer translates them in numbers as computers can
understand only numbers.
A computer can understand positional number system where there are only a few symbols called
digits and these symbols represent different values depending on the position they occupy in the
number.
The digit
The position of the digit in the number
The base of the number system (where base is defined as the total number of digits
available in the number system).
Decimal Number System
The number system that we use in our day-to-day life is the decimal number system.
Decimal number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system,
the successive positions to the left of the decimal point represent units, tens, hundreds, thousands
and so on.
Each position represents a specific power of the base (10). For example, the decimal
number 1234 consists of the digit 4 in the units position, 3 in the tens position, 2 in the hundreds
position, and 1 in the thousands position, and its value can be written as
Example
Binary Number: 101012
Calculating Decimal Equivalent:
Step Binary Number Decimal Number
Step 1 101012 ((1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10
Step 2 101012 (16 + 0 + 4 + 0 + 1)10
Step 3 101012 2110
Note: 101012 is normally written as 10101.
Octal Number System
Characteristics
Uses eight digits, 0,1,2,3,4,5,6,7.
Also called base 8 number system
Each position in a octal number represents a 0 power of the base (8). Example 8 0
Last position in a octal number represents a x power of the base (8). Example 8x where x
represents the last position - 1.
Example
Octal Number: 125708
Calculating Decimal Equivalent:
Step Octal Number Decimal Number
Step 1 125708 ((1 x 84) + (2 x 83) + (5 x 82) + (7 x 81) + (0 x 80))10
Step 2 125708 (4096 + 1024 + 320 + 56 + 0)10
Step 3 125708 549610
Note: 125708 is normally written as 12570.
Example
Hexadecimal Number: 19FDE16
There are many methods or techniques which can be used to convert numbers from one base to
another. We'll demonstrate here the following
Integer Part:
Decimal to Non Decimal
Use Division
o Decimal to Binary
Method Note:
o Decimal to Octal Fraction Part: Use Only
o Decimal to Hexadecimal Use Carry Method Non-Decimal
Non Decimal to Decimal
Base
o Binary to Decimal For Both Integer Part
o Octal to Decimal & Fraction Part:
o Hexadecimal to Decimal Use Multiplication Method
Non Decimal to Non Decimal
o Binary to Octal
o Binary to Hexadecimal
Here first convert the given Non Decimal to Decimal
o Octal to Binary and Convert the resulted Decimal to Non Decimal
o Octal to Hexadecimal i.e., Non Decimal to Non Decimal = Non Decimal to
Decimal to Non Decimal
o Hexadecimal to Binary
o Hexadecimal to Octal
Definition:
Algorithm is a finite set of instructions if followed accomplishes a particular task. (OR) a
step by step description of a particular task. An algorithm must satisfy the following
criteria.
Explanation
Input: an algorithm must take zero, one or more quantities as input
Output: must produce one or more outputs
Definiteness: each step of the algorithm must be clear and unambiguous.
Finiteness: an algorithm must terminate in finite number of steps.
Effectiveness: each step must be effective so that each step easily convertible into
program statement.
An algorithm is said to be accurate and truthful only when it provides the exact required
output. The steps in algorithm divided into three categories.
(1). Sequence
(2). Selection
(3). Iteration
(1). Sequence:
The steps described in an algorithm are performed successively one by one without
skipping any step.
Rules:
Each step is simple and easy to understand.
Each and every step in an algorithm is executed.
step1: start
step2: read A, B
step3: C = A + B
step4: write C
step5: stop
In the above algorithm all the steps are successively executed one by one to perform addition of
A & B variables. You cannot skip any step in the above algorithm.
(2). Selection:
Depending on the condition you can skip the steps and directly select the desired step and
execute.
step1: start
step2: read A, B
step3: if(A>B)
step4: write A is Greater
step5: else write B is Greater
step6: stop
in the above algorithm depending on the condition in the step3, you can select either
step4 or step5
(3). Iteration:
Performing the some action number of times.
step1: start
step2: n =1
step3: write n
step4: n=n+1
step5: if(n<=100) goto step3
step6: stop
In the above case step3 & 4 are repeated until the condition in step5 fails.
Characteristics of Algorithm
In the Algorithms each and every instruction should be precise and unambiguous.
The instructions in an algorithm should not be repeated infinitely.
Ensure that the algorithm 1will ultimately terminate.
The algorithm should be written in sequence.
lt looks like normal English.
The desired result should be obtained only after the algorithm terminates.
A Flowchart is a graphical representation for an algorithm; it is the layout and visual representation
of the plan to be followed by the corresponding algorithm
Start Start
Read a, b Read a, b
c=a+b Yes No
If a>b
Write b is
Write c Write a is
greater
greater
Stop
Stop
General rules for flowcharts
All symbols of the flowchart are connected by flow lines (note arrows, not lines)
Flow lines enter the top of the symbol and exit out the bottom, except for the Decision
symbol, which can have flow lines exiting from the bottom or the sides
Flowcharts are drawn so flow generally goes from top to bottom
The beginning and the end of the flowchart is indicated using the Terminal symbol
Advantages
1. It can be done easily in any word processor
2. It can be easily modified as compared to flowchart
3. It can be written easily and converting to program is easy
Disadvantages
1. It is not visual
2. We do not get a picture of the design
3. There is no standardized style or format
4. For beginners it is more difficult to follow the logic
Ex - 1: To calculate student total and average
Task List
Read name, class, marks. Calculate total and average. Write name, class, total, average.
Pseudo code
READ name, class, m1,m2,m3.
Total = m1+m2+m3
Average=TOTAL/3
WRITE name, class, total, average.
Ex 2: For a given value, Limit, what is the smallest positive integer Number for which the
sum Sum = 1 + 2 + ... + Number is greater than Limit. What is the value for this Sum?
1. Enter Limit
2. Set Number = 0.
3. Set Sum = 0.
4. Repeat the following:
a. If Sum > Limit, terminate the repitition, otherwise.
b. Increment Number by one.
c. Add Number to Sum and set equal to Sum.
5. Print Number and Sum.
Ex-3:
1. Declare variables: dividend, divisor, quotient
2. Prompt user to enter dividend and divisor
3. Get dividend and divisor
4. IF divisor is equal to zero, THEN
a. DO
i. Display error message, divisor must be non-zero
ii. Prompt user to enter divisor
iii. Get divisor
b. WHILE divisor is equal to zero
5. ENDIF
6. Display dividend and divisor
7. Calculate quotient as dividend/divisor \
8. Display quotient