Professional Documents
Culture Documents
Introduction to Computer
INTRODUCTION- The word computer is derived from the word compute. Compute means to calculate. The
computer was originally defined as a super fast calculator .The set of instructions given to the computer to
perform various operations is called as the Computer program. The process of converting the input data into
the required output form with the help of the computer program is called as data processing. The computers
are therefore also referred to as data processors
The terms hardware and software are almost always used in connection with the computer.
• The Hardware: The hardware is the machinery itself. It is made up of the physical parts or devices of the
computer system like the electronic Integrated Circuits (ICs), magnetic storage media and other mechanical
devices like input devices, output devices etc. All these various hardware are linked together to form an
effective functional unit. The various types of hardware used in the computers, has evolved from vacuum
tubes of the first generation to Ultra Large Scale Integrated Circuits of the present generation. • The Software:
The computer hardware itself is not capable of doing anything on its own. It has to be given explicit
instructions to perform the specific task. The computer program is the one which controls the processing
activities of the computer. The computer thus functions according to the instructions written in the program.
Software: Software mainly consists of these computer programs, procedures and other documentation used in
the operation of a computer system. Software is a collection of programs which utilize and enhance the
capability of the hardware.
Generation of Computer:
The computers of today are vastly different in appearance and performance as compared to the computers of
earlier days. But where did this technology come from and Where is it heading? To fully understand the
impact of computers on today’s world and the promises they hold for the future, it is important to understand
the evolution of computers.
ENIAC (Electronic Numeric Integrator and Calculator) – The first all electronic computer was produced by a
partnership between the US Government and the University of Pennsylvania.
EDVAC – In the mid 1940’s Dr. John von Neumann designed the Electronic Discrete Variable Automatic
Computer with a memory to store both program and data. This was the first machine which used the stored
program concept.
1-The third generation computers were characterized by: Use of Integrated circuits,
2- Phenomenal increase in computation speed,
3- Substantial reduction in size and power consumption of the machines,
4- Use of magnetic tapes and drums for external storage,
5- Design-of Operating systems and new higher level languages,
6- Commercial production of computers.
The Fifth Generation: Defining the fifth generation computers is somewhat difficult because the field is still in
its infancy. The computers of tomorrow would be characterized by Artificial Intelligence (At). An example of Al
is Expert Systems. Computers could be developed which could think and reason in much the same way as
humans. Computers would be able to accept spoken words as input (voice recognition).
CLASSIFICATION OF COMPUTERS.
Analog computers: In analog computers, data is recognized as a continuous measurement of a physical property
like voltage, speed, pressure etc. Readings on a dial or graphs are obtained as the output, ex. Voltage,
temperature; pressure can be measured in this way.
Digital Computers: These are high speed electronic devices. These devices are programmable. They process data
by way of mathematical calculations, comparison, sorting etc. They accept input and produce output as discrete
signals representing high (on) or low (off) voltage state of electricity. Numbers, alphabets, symbols are all
represented as a series of 1s and Os.
Hybrid Computers: Hybrid Computers are a combination of Analog and Digital computers. They combine the
speed of analog computers and accuracy of digital computers. They are mostly used in specialized applications
where the input data is in an analog form i.e. measurement. This is converted into digital form for further
processing. The computers accept data from sensors and produce output using conventional input/output devices.
Computers only understand machine code (binary), this is an issue because programmers prefer to use a
variety of high and low-level programming languages instead.To get around the issue, the high-level and
low-level program code (source code) needs to pass through a translator.A translator will convert the source
code into machine code (object code).
There are several types of translator programs, each able to perform different tasks.
Compiler:-
Compilers are used to translate a program written in a high-level language into machine code (object
code).Once compiled (all in one go), the translated program file can then be directly used by the computer
and is independently executable.
Compiling may take some time but the translated program can be used again and again without the need for
recompilation.
Interpreter programs are able to read, translate and execute one statement at a time from a high-level language
program.The interpreter stops when a line of code is reached that contains an error.
Assembler
Assemblers are used to translate a program written in a low-level assembly language into a machine code
(object code) file so it can be used and executed by the computer. Once assembled, the program file can be
used again and again without re-assembly.
Summary of translators
Translates low-level
Temporarily executes high-level
Translates high-level languages into assembly code
languages, one
machine code into machine
statement at a time
code
An executable file of
No executable file of machine
An executable file of machine code is machine code is
code is produced (no
produced (object code) produced (object
object code)
code)
‘’a set of steps to accomplish or complete a task that is described precisely enough that a computer can run
it’’.
One or more instructions should not be repeated infinitely. This ensures that the algorithm will ultimately
terminate .
After performing the instructions, that is after the algorithm terminates, the desired results must be obtained
There are 50 students in a class who appeared in their final examination. Their mark sheets have been given
to you. The division column of the mark sheet contains the division (FIRST, SECOND, THIRD or FAIL)
obtained by the student. Write an algorithm to calculate and print the total number of students who passed in
FIRST division.
Step 3: Check the division column of the mark sheet to see if it is FIRST, if no, go to Step 5.
Step 8: Stop.
Flowchart
- Uses symbols (boxes of different shapes) that have standardized meanings to denote different types of
instructions
-Boxes are connected by solid lines having arrow marks to indicate the exact sequence in which the
instructions are to be executed
A student appears in an examination, which consists of total 10 subjects, each subject having maximum
marks of 100. The roll number of the student, his/her name, and the marks obtained by him/her in various
subjects are supplied as input data. Such a collection of related data items, which is treated as a unit is
known as a record. Draw a flowchart for the algorithm to calculate the percentage marks obtained by the
student in this examination and then to print it along with his/her roll number and name.
Better Communication
Efficient coding
Systematic debugging
Systematic testing
LIMITATION OF FLOWCHART
Flowcharts are very time consuming and laborious to draw (especially for large complex programs)
There are no standards determining the amount of detail that should be included in a flowchart
PSEUDO-CODE
A program planning tool where program logic is written in an ordinary natural language using a structure
that resembles computer instructions
33 | P a g e Prepared By:- Ankur Rohilla
“ Pseudo” means imitation or false and “ Code” refers to the instructions written in a programming language.
Hence, pseudocode is an imitation of actual computer instructions
Because it emphasizes the design of the program, pseudocode is also called Program Design Language
(PDL)
Any program logic can be expressed by using only following three simple logic structures:
1. Sequence logic,
3. Iteration (or looping) logic Programs structured by using only these three logic structures are called
structured programs, and the technique of writing such programs is known as structured programming
SEQUENCE:-
SELECTION
Also known as decision logic, it is used for making decisions • Three popularly used selection logic
structures are 1. IF…THEN…ELSE 2. IF…THEN 3. CASE
Used to produce loops in program logic when one or more instructions may be executed several times
depending on some conditions
Converting a pseudocode to a programming language is much more easier than converting a flowchart to a
programming language
- As compared to a flowchart, it is easier to modify the pseudocode of a program logic when program
modifications are necessary
- Writing of pseudocode involves much less time and effort than drawing an equivalent flowchart as it has
only a few rules to follow
LIMITATION OF PSEUDOCODE
- Different programmers use their own style of writing pseudocode and hence communication problem
occurs due to lack of standardization
- For a beginner, it is more difficult to follow the logic of or write pseudocode, as compared to flowcharting