Unit 1 PDF
Unit 1 PDF
INTRODUCTION TO COMPUTER
Introduction
The term ‘Computer’ was first introduced in 1640 and referred to as ‘one who
calculates’.
It was derived from the Latin word ‘computare’, which meant ‘to calculate.
Robotics
agriculture
Generations of Computer
In computer terminology, the word ‘generation’ is described as a stage of
technological development or innovation.
It could carry only 650 Magnetic tapes were used as input and output media at
instructions per second a speed of around 13,000 characters/s
Its first installation was in the Census Bureau, which
was used for 10 years
Classifications of Computers
Today, computers are available in
different sizes and types
One can have a computer that can fit in
the palm to those that can occupy the
entire room
Some computers are designed to be used
by a single user only whereas some
computers can handle the needs of many
users simultaneously
Computers also differ based on their
data-processing abilities
In general, the computers can be classified
according to size, based on work and
purpose-
Classification According to
Purpose
General-Purpose Computers: Special–Purpose Computers:
A general-purpose computers, as the These computers are designed to handle a
name suggests, is designed to perform a specific problem or to perform a single
range of tasks specific task
These computers have the ability to store A set of instructions for the specific task is
numerous programs built into the machine
These machines can be used for various They cannot be used for other applications,
applications, ranging from scientific to that is, they lack versatility
business-purpose applications
They can provide the result very quickly
Even though such computers are and efficiently
versatile, they generally lack in speed and
efficiency These computers are used for airline
The computers used in schools and reservations, satellite tracking and air traffic
homes are general-purpose computers. control
Classification According to Data
Handling(work)
Analog Computer:
A computing machine that operates on data in the form of continuously
variable physical quantities is known as analog computer
They measure continuous physical magnitudes(e.g. temperature,
Pressure and voltage)
Analog computers are used for scientific and engineering purpose
These computers give approximate results since they deal with quantities that vary
continuously
They are vary fast
It is very easy to get graphical results directly using analog computer
The accuracy of analog computers is less
Example: speedometer of car, ECG machine
Classification According to
Data Handling(work)
Digital Computer:
A computer that operates with information, numerical or
otherwise, represented in a digital form in known as digital computer
Such computer process data (including text, sound, graphics
and video) into a digital value(in 0s and 1s)
In digital computers, analog quantities must be converted
into digital quantity before processing and after processing
digital output is converted into analog quantity
Digital computers can give the results with more accuracy
They are slower than analog computer
Example: Desktop PC
Classification According to
Data Handling(work)
Hybrid Computer:
Hybrid computer incorporated the measuring feature of
an analog computer and counting feature of a digital computer
For computational purposes, these computers use the
analog components and for the storage of the information,
digital memories are used
Hybrid computers comprehensively use converters
It combines the best features of analog and digital computers
Such computers are broadly used in scientific applications,
various fields of engineering and industrial control process
Example: Hybrid computer is used in hospital to measure the heart beat of the ICU patients
Classification According to
Size(Functionality)
Micro Computers:
It consists of a microprocessor, a storage unit, an input unit and an output unit,
the addition of a power supply and connecting cables,
appropriate peripherals( keyboard, mouse, monitor), an operating system
and other software programs
They are extensively employed for personal usage
They are smaller and comparably less expensive
It has a limited computational capacity.
They are quite simple to use
They are the most affordable
These computers were designed only for individual users, but nowadays, when networked
together, they can serve more than one user
Example: IBM-PC Pentium 100, Apple Macintosh
Types of Micro-Computer
Desktop: Laptop:
Desktop Computer is a Personal Laptop is a small size of the computer system
Computer(PC) enclosing all the basic features of a normal
desktop
This computer is heavyweight it is used a
one location and one person work at a time Laptop is a more powerful computing device and
laptop is a multi-tasking computer
The main part of desktop computer is LCD We can carry very easily because this is
Screen, CPU, Keyboard, Mouse, and UPS lightweight
They are not very expensive for the We can do many types of work with the help of
individual laptop
PC manufacturers: APPLE, IBM, Dell and Light weight version of laptop is called note book
HP(Hewlett-Packard)
They are expensive as compared to desktop
It has a rechargeable battery
Types of Micro-Computer
Tablet: Smartphone:
Tablet Computer just like a Mobile Device Smartphone is a cell phone that functions
but bigger than Smartphone and smaller like a computer.
then Notebook Computer.
A new generation Smartphone build is very
Just like Totally Smartphone feature like advanced and high technology.
Touch screen display, power full Battery
Backup and we can calling and receiving The New generation Smartphone is Multi-
call and click pictures and anything. purpose and Multi-tasking phone.
We can do send Email, Listing Music, take
pictures, and use Face book and other
social media platform.
Classification According to
Size(Functionality)
Mini Computers:
A mini computer is a small digital computer, which normally is able to process and less data
than mainframe, but more than micro computer
They are used as desktop devices that are often connected to a mainframe to perform the
auxiliary operations
A mini computer(also called mid-range computer) is designed to meet the computing needs of
several people simultaneously in a small to medium sized business
It is capable of supporting 4 to 200 simultaneous users
They are used for real-time controls and engineering design work
High performance work-stations with graphics I/O capability use mini computers
Example: PDP 11, IBM(8000 series), VAX 7500
Classification According to
Size(Functionality)
Mainframes Computer:
A mainframe is an ultra high-performance computer made for high-volume, processor-intensive
computing
They can usually execute many programs simultaneously at a high speed
Mainframes are the second largest(in capability and size) of the computer family
It is able to process and store more data than a mini computer
Mainframe computer allows its user to maintain large information storage at a centralized location and is
able to access and process this data from different computers located at different locations
It is typically used by large businesses and for scientific purpose
They have a significant number of CPUs with powerful processing speeds.
Tightly Coupled Clustering Technology is employed.
Example: IBM’s ES000, VAX 8000 and CDC 6600
Classification According to
Size(Functionality)
Super Computer:
Super computers are the special purpose machine, which are specially designed to maximize the numbers of
FLOPS(floating point operation per second)
Its processing speed lies in the range of 400-10,000 MFLOPS(millions of floating point operation per second)
It has the highest processing speed at a given time for solving scientific and engineering problems
It basically contains a number of CPUs that operate in parallel to make it faster
They can resolve complex mathematical equations in a few hours, which would have taken a scientist with paper and
pencil a life time
They are the fastest, costliest and most powerful computers
They are used to solve multivariant mathematical problems of existent physical processes such as aerodynamics,
metrology and plasma physics
These are also required by the military strategists to simulate defence scenarios
Cinematic specialists use them to produce sophisticated movie animation
Scientists build complex models and simulate them in a super computer
They has limited use because of its high cost and limited market
Example: CRAY-3, Cyber 205 and PARAM
The Computer System
A computer can be viewed as a system, which consists of a number of interrelated
components that work together with the aim of converting data into information
In a computer system, processing is carried out electronically, usually with little or no
intervention from the user
Computer needs to be instructed on exactly what to do and how to do
The instructions given to the computers are called Programs
without programs, computers would be useless
Any physical parts connected to the computer or any part of the computer outside the
CPU and the working memory is known as a peripheral, example: keyboard, mouse and
monitor
Block diagram of a Computer
A Block diagram of a
computer displays a
structural representation of
a computer system. The
block diagram gives you a
quick overview of the
working process of a
computer form inputting
the data to retrieving the
desired output.
Components of Computer System
Computer components are the essential building parts of developing a functional computer
system
The processor (CPU), memory, and input/output devices are every computer's three main
building blocks
Initially computers were primarily used for numerical computations because any
information can be numerically encoded.
The ability of computers to interpret information for several purposes was quickly
recognized
There are 5 main computer components that are given below:
Input Unit
CPU
Output Unit
Primary Memory
Secondary(Auxiliary) Memory
Functions of computer component
The following five are major operations carried out by computer components:
1.Inputting: It is the process of entering data and instructions into a computer system
2.Storing: It is the process of saving data and instructions to make them readily
available for initial or additional processing as and when 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 is known as processing
4.Outputting: It is the process of producing useful information or results for a user, such
as printed report or visual display
5.Controlling: Directing the manner and sequence in which the above operations are
performed is known as controlling
Input Unit
The input unit that links a computer with its external environment performs this task
Data and instructions enter a computer through an input unit in a form that depends
upon the input device used
A computer’s memory is designed to accept input in binary code and hence, all input
devices must transform input signals to binary codes. Units called input interfaces
accomplish this transformation
Input interfaces match the unique physical or electrical characteristics of input devices
to the requirements of a computer system
The devices used to input data into the computer are called input devices
Example: keyword, mouse, scanner
Output Unit
Output unit supplies information obtained from data processing to outside world. It links
a computer with its external environment
Before supplying the results to outside world, this unit must convert them binary code to
human readable form. Units called output interfaces accomplish this task
This unit is an essential component of a computer because without it we cannot obtain
or see information or desired results
The output unit contains the devices needed to receive and view information from a
computer
Example: monitor, Printer, speaker, projector
Central Processing Unit(CPU)
A computer machine's "brain" is its central processing unit (CPU) also known as
processor
It executes the calculations and commands required for functioning of the computer
device
The CPU comprises some components: the control unit, the arithmetic logic unit (ALU),
and registers
It issue commands to all parts of the computer system
It controls the sequence of operations as per the stored instructions
it performs the data-processing operation and sends the results to the output unit
CPU works with data in discrete form that is 1 or 0
Central Processing Unit(CPU)
The CPU itself has three parts:
•The CPU’s Control Unit(CU) is a crucial component. It is in charge of reading and
decoding instructions from memory. The right part of the CPU receives and executes
these instructions from the control unit. It also controls the I/O devices and directs the
overall functioning of the other units of the computer
•The ALU, often known as the Arithmetic Logic Unit(ALU), is another crucial CPU part.
The ALU operates addition, subtraction, comparison calculations, and other logical and
mathematical processes. These operations are carried out using binary logic, which
limits operations to the 0 and 1 digits
•Registers are compact, high-speed data and instruction storage spaces within the CPU.
They are utilized to store data that is being processed by the CPU momentarily.
Registers are used to accelerate data processing because they are much faster than
other forms of memory, such as RAM
Primary Memory
The CPU has direct access to primary memory
The data and instructions that are currently being processed are kept in primary memory
The data and instructions are accessed by the CPU from primary memory when a computer
program is running
The information is removed from primary memory once the program is completed
Primary memory is classified into two types: Random Access Memory (RAM) and Read-Only
Memory (ROM)
RAM is the most common form of primary memory and is used to store data and instructions that
the CPU wishes to access frequently. RAM is volatile.
ROM is a form of memory this is used to store data and instructions that don't change. ROM is
non-volatile.
Other primary memory types, including cache memory, are sometimes used in computer
systems. High-speed memory called cache saves information and instructions, which might be
utilized often.
Secondary Memory
Secondary memory, also called auxiliary storage, is a type of computer memory that is
used to store data and programs that aren't currently being utilized by the CPU
secondary memory is non-volatile, which means that its contents are not lost when the
computer is turned off
These devices have varying storage capacities, read and write speeds, and different
capabilities that make them appropriate for different types of applications
Users can store a lot of data and programmed in secondary memory, which is useful
since it makes them accessible fast and readily when needed
Users can also protect crucial data from loss due to system crashes or other issues by
using secondary memory devices as backups
There are several types of secondary memory devices, such as hard disk drives
(HDD), solid-state drives (SSD), optical disks (including CDs and DVDs), and USB
flash drives
Primary Memory Secondary Memory
Parts of Computer
A computer system is divided into two
categories: Hardware and Software
Multimedia Software: VLC media player, Windows Movie Maker, Picasa, Windows
Media Player
Web Browsers: Chrome, Mozilla Firefox, Microsoft Internet Explorer, Apple Safari
1960-ALGOL60 was developed by German Society of Applied Mathematics and Association of Computing Machinery
1960-COBOL(COmmon Business Oriented Language) was developed for business purpose by US Department of
Defense
BPCL, BASIC, PASCAL and B were developed in late 1960s and early 1970s
In early 1970s, Dennis Ritchie developed C at Bell laboratories using some of the features of B language
C++ was developed by Bjarne Stroustrup in early 1980s, extending the features of C and introducing object-oriented
features
Java, originally called Oak, was developed by Sun Microsystems of USA in 1991 as general purpose language
Python, was developed by Guido van Rossum in 1991 and further developed by the Python Software foundation
Language Classification
Computer understand only one language,
that is binary language or the language of
0s and 1s.
Binary language is also known as machine
or low-level language. Although these
programs were easily understood by the
computer, it proved to difficult for a normal
person to remember all the instructions in
the form of 0s and 1s.
For solving this problem, other
programming languages are developed
which are easier to learn and understand.
Programming languages can be divide into
3 major categories-
Machine Language
"Low-Level Language" is another name for machine language.
In machine language, binary digits such as 0s and 1s are used.
There's no need for interpretations since computers can understand binary codes.
They were heavily utilized in the very earliest computers.
Both learning and using them are complex.
A program's writing and compilation took a decent amount of time to create
Advantage: Disadvantage:
Translation free Machine dependent
Complex
High speed Error prone
Time consuming
Assembly Language
Assembly language is a middle-level language.
It consists of a set of instructions in a specific format
called commands.
It uses symbols to represent field of instructions.
It is very close to machine level language.
The computer should have assembler to translate assembly level
program to machine level program.
It is in human-readable format and takes lesser time to write a
program and debug it
it is a machine dependent language.
Advantage: Disadvantage:
Easy to understand and use Machine dependent
Less error prone Harder to learn
Efficiency Slow development time
More control on hardware Less efficient
High-level Language
A High-Level Language is a computer programming language that uses English like
statements to write the computer instructions.
High-level languages are most widely programming languages because they are easy to
understand to human being.
It can be considered as a programmer-friendly language. Advantage:
Simple to write
It is easy to understand and debug
User familiar
It is simple in terms of maintenance. Solving complex problem
It requires a compiler/interpreter to be translated into machine code. Portable
Machine independent
It can be run on different platforms.
Disadvantage:
It can be ported from one location to another. Higher processing power is
It is less memory efficient, i.e., it consumes more memory in required
comparison to low-level languages. More memory is required
Time consuming
It is widely used. Translator is required
Example of High-level Language
C Sum of two number using C programming language
C++
JAVA
PYTHON
HTML
PHP
PROLOG
ORACLE
VB.NET
ASP.NET etc.
Features of a good programming language
Ease of Use: The language should be easy in writing codes for the programs and
executing them. The ease and clarity of a language depends upon its syntax
Portability: The languages should support the construction of code in a way that it
could be distributed across multiple platforms. The computer languages should be
independent of any particular hardware or operating system
Naturalness for the application: A programming language should provide a
conceptual framework for thinking through algorithms and means of expressing those
algorithms through flowcharts
Reliability: Reliability is concerned with making a system failure-free, and thus is
concerned with all possible errors
Safety: Safety is concerned with the extent to which the language supports the
construction of safety-critical systems, yielding systems that are fault-tolerant, fail-safe or
robust in the face of systematic failure
Features of a good programming language
Structured Programming: A good language should be capable of supporting
structured programming
Compact Code: A good language should also promote compact coding, that is, the
intended operations should be coded in a minimum number of lines
Maintainability: maintainability is actually facilitated by most of the languages, which
makes it easier to understand and then change the software
Reusability: the language should facilitate the adaptation of code for use in other
applications
Concurrency support: Concurrency support refers to the extent to which inherent
language supports the construction of code with multiple threads of control
Performance: performance means that the language should not only capable of
interacting with the end users, but also with the hardware
Selection of a programming language
Nature of Application: A programmer should select a language that is suitable for the
application area at hand
Language Acquaintance: In some cases, a number of languages may suit the
application to be developed. In that case, the language, which is most familiar to the
programmers should be chosen
Ease to learning: Choose languages which are suitable for the proposed application.
Then the programmer has to decide which language is easier to learn and use
Features of a good programming language: choose programming language which
possess all the characteristics of a good programming language
Execution efficiency: If the execution efficiency of an application is important, the
programmers can use an assembly language instead of high-level language
Language Translator
Computers understand only one language consisting of 0s and 1s is called machine language
So a tool was required, which could translate a program written in a high-level programming language
to machine language
Along with every programming language developed, a language translator was also developed
Language translators help in converting programming languages to machine language, that is, they
convert programming statements into 0s and 1s that the computer is able to process
A language translator is as system software which translate source code(programmer written code) to
object code(machine code)
Depending upon the programming language used, language translators are divide into three
major categories:
Compilers
Interpreters
Assembler
Assembler
Assembler is a simple language translator which is used to translate assembly program
into machine code
The assembler recognizes the character strings that make up the symbolic names of
various machine operations and substitutes the required machine code for each
instruction
Complier
A compiler is a translator program(more complex than a assembler) that translates a high-
level language program into its equivalent machine language program
A complier is so called because it complies a set of machine language instructions for every
program instruction of a high-level language
There is a one-to-many correspondence between the high-level language instructions of a
source program and the machine language instructions of its equivalent object program
During the process of translation of a source program into equivalent object program by the
complier, the source program is not under execution
Compiler only converts it into a form that the computer can execute
Each computer requires a separate compiler for each high-level language that it supports
In addition to translating high-level language instructions into machine language
instructions, compilers also detect and indicate certain types of errors in source programs
automatically
Interpreter
An interpreter is a language translator, which analyses and executes the source code in
a line-by-line manner, without looking at the entire program
It translates a statement in a program and executes the statement immediately, that is,
before translating the next source language statement
Interpreters are easier to write because they are less complex programs than compliers
They also require less memory space for execution than compilers require
In case of an interpreter, since a user cannot save the object program for further use,
repeated interpretation of a program is necessary for its repeated execution
Interpreters allows the programmer to make corrections during interactive program
development. Therefore, interpreters make it easier and faster to correct programs
Execution Phase of a Program
The execution of a program involves 4 steps:-
1) Translation: Converting source program to object
modules. The assemblers, compilers and interpreter fall
under the category of translators.
2) Linking: combines two or more separate object modules
and supplies the information needed to allow references
between them.
3) Relocation: This modifies the object program so that it
can be loaded at an address different from the location
originally specified.
4) Loading: which brings object program into memory for
execution .It is done by a loader.
Linker
Linker is a program that links several object modules and libraries to a single executable
program.
A source code of a program is often very large consisting of several hundred or more lines. The
source code may also include reference to libraries. All these independent modules may not be
stored in a single object file. The code is broken down into many independent modules for easy
debugging and maintenance. Before execution of the program, these modules and the required
libraries are linked together using the linker software.
There are two types of linkers available: Linkage Editor and Dynamic Linker.
Linker also helps combine all the object modules.
Linker is responsible to arrange the objects in the program’s address space.
Loader
Loader is special program that takes input of executable files from linker, loads it to main
memory, and prepares this code for execution by computer.
Loader allocates memory space to program. Even it settles down symbolic reference between
objects. It is in-charge of loading programs and libraries in operating system.
There are 3 types of loaders: Absolute loading, Relocatable loading and Dynamic run-time
loading.
It helps allocate the addresses to executable codes or files.