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

PGDIT 101 Introduction To IT and Programming - Lecture 1 Program & Programming Languages

The document provides an overview of programs, programming languages, and different types of software. It discusses: 1) What a program and software are, and how programs direct hardware and software functions computer operations. 2) The two main types of software: system software which manages internal computer operations, and application software which solves specific user problems. 3) The different levels of programming languages from low-level machine language to high-level languages, and examples of each. 4) How machine language uses binary code but is difficult for humans, assembly language uses symbolic codes but still requires translation, and high-level languages are like English and independent of hardware.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
194 views

PGDIT 101 Introduction To IT and Programming - Lecture 1 Program & Programming Languages

The document provides an overview of programs, programming languages, and different types of software. It discusses: 1) What a program and software are, and how programs direct hardware and software functions computer operations. 2) The two main types of software: system software which manages internal computer operations, and application software which solves specific user problems. 3) The different levels of programming languages from low-level machine language to high-level languages, and examples of each. 4) How machine language uses binary code but is difficult for humans, assembly language uses symbolic codes but still requires translation, and high-level languages are like English and independent of hardware.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

What is Software?
 The term software refers to the organized sets of instructions that tell the
hardware what to do.
 The finite set of instructions that the computer follows to solve a particular
problem is called a computer program. Collectively, the group of programs
that a computer needs to function is known as software.

Classification of Software:
Software can be classified into two broad categories: These are
i) System software
ii) Application software

System Software
 System software directs the internal operations of the computer, such as
managing the input and output devices.
 This software does the basic functions necessary to start and operate a
computer.
 It controls and monitors the various activities of a computer and makes it
easier and more efficient to use the computer.
 Operating system is one kind of system software.

Application Software
 Application software directs the computer to solve specific user-oriented
problems such as preparing payroll, preparing electricity bills, creating your
curriculum vitae etc.
 Microsoft Word, Microsoft Excel, Adobe PhotoShop, Internet Explorer etc are
the example of application software.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 1 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Various Categories and Examples of Application Software:


Class Example

Word Processing Software Microsoft Word, Word Perfect, Word Star,


Latex etc.

Spreadsheet Analysis Software Microsoft Excel, Lotus-1-2-3 etc.

Database Software Microsoft Access, Oracle, FoxPro etc

Presentation Design Software Microsoft PowerPoint

Graphics Software Adobe PhotoShop, MS Paint, Adobe


Illustrator etc

Browsing Software Internet Explorer, Netscape Navigator, Opera


etc.

E-Mail Software Eudora, Outlook Express, Pegasus Mail etc.

What is Program?
 The finite set of step-by-step instructions that the computer follows to solve a
particular problem is called a computer program.
 Some programs (called system programs) direct the internal operation of the
computer while other programs (called application programs) direct the
computer to solve specific user-oriented problems.

What is Programming Language?


 As we know, a language is a system of communication.
 A programming language is a set of written symbols and characters
governed by a set of rules that instruct the computer to perform specified
tasks.
 All computers understand only binary machine language. However, complex
programming languages have been developed that can instruct computer to
work.
 Some programming languages are easy to learn, others are better for
business applications. Some languages are even English like.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 2 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Classification of Programming Language:


Three types of programming language are available; these are:
i) machine language (known as low-level language)
ii) assembly language (known as symbolic language)
iii) high-level language (known as procedure-oriented language)

But, mainly two major categories of programming languages are:


i) low-level language (these languages comprise machine language and
assembly language)
ii) high-level language

Machine Language
 Every computer has its own language that need not to be translated. This
language is called machine language, i.e. the language in which binary code is
used to write a program.
 The computer understands this language directly.

Features of Machine Language:


i) The only language understood by machine is the machine language.
ii) Machine language is machine dependent, i.e. program written in machine
language for a particular computer is not running for another type of
computer.
iii) Instructions in machine language are presented by binary number, which
is easy to handle with.
iv) No translation or compilation of a machine language program is needed
because, machine instructions are directly understood by the CPU.
v) Programs written in machine language can be executed very quickly.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 3 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Demerits of Machine Language:


i) Writing programs in machine language is tedious, time-consuming, and
highly error-prone.
ii) Writing programs in machine language requires a high level of
programming skill.
iii) Machine language is machine dependent (i.e. a program that has been
developed for a particular machine cannot be run on another machine).
iv) It is very difficult to correct or modify a machine language program.
(Checking machine instructions to locate errors is same as writing them
initially. Any modification in machine language program results in a series
of changes. If a program is to be modified by adding or deleting some
instructions, then address of all subsequent instructions are to be changed.
These changes cause further modifications in address and the operands).

Assembly Language
 In machine language, the sequence of program is represented by binary
numbers.
 Hence, to write a program using this language is very cumbersome,
moreover, it is very difficult to make even a minor modification as the
program sequence has to be changed.
 To alleviate this difficulty somewhat, assembly language may be used to write
programs wherein the sequence of programs is represented by symbolic code
called mnemonics.

Features of Assembly Language


i) Computer cannot understand assembly language.
ii) Before executing, an assembly language program must be translated into
machine language by a special translator program called assembler.
iii) This language is machine dependent.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 4 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Example of an Assembly Language:


Op code Operand Meaning
LDR R1,X Load the value stored at location X into register1
ADD R1,Y At the value stored at location Y to the value in
register1
STORE R1,Z Store the value in register1 at location Z

Advantage of Assembly Language over Machine Language


i) Operation codes used in machine language are replaced by mnemonics
which are easier to remember.
ii) It is not required to keep truck of memory location as is required in
machine language. The memory addresses are replaced by variable name.
iii) While writing programs in assembly language, few errors are made and
those are easier to find.
iv) Insertion and deletion in the assembly language program is easier to than
that of machine language.

Disadvantage of Assembly Language


i) Program written in assembly language for a particular machine are not
executed on another machine.
ii) Coding in assembly language is time-consuming.
iii) Assembly language is less efficient than machine language, because it
needs to be translated.

High Level Language


 The programming language in which symbols and words are similar to those
of ordinary mathematics and English-like and are independent of computer is
known as high-level language.
 It allows the programmers to utilize many of the symbols and much of the
terminology that is already familiar and to write programs conveniently.
 It is easier to learn and use.
 Programs written by this language is machine independent.
 It is the most widely used programming language.
*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 5 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Example of Some High-level Languages:


i) ForTran (Formula Translation)
ii) BASIC ( Beginner’s All-purpose Symbolic Instruction Code)
iii) COBOL (COmmon Business Oriented Language)
iv) ALGOL (ALGOrithmic Language)
v) PASCAL
vi) C
vii) PROLOG (PROgramming in LOGic)
viii) LISP (List Processing)

Features of High-level Language:


i) A high-level language programs needs to be translated into a machine
language before executing by a special translator program called compiler
or interpreter.
ii) Less efficient than machine language.
iii) Easier to learn, code, and understand.
iv) Ease of maintenance and documentation.
v) Ease of debugging

Disadvantage of High-level Language


i) Need compilation and hence need more time for execution than to
machine language.
ii) Each time the source program is modified, it has to be recompiled.

Source Code:
 A program written in high-level or assembly language is called source code of
the program.

Object Code:
 Any program not written in machine language has to be translated before it is
executed by the computer.
 Translation of source code into machine code is called object code.
*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 6 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Problem Solving Steps:


 Before writing the program, to solve a particular problem, the programmer
must have a thorough understanding of the problem, as well as an approach
to solve it.
 The series of steps for the development of a program is known as program
development process.
 The steps involve:
i) Problem analysis
ii) Algorithm development
iii) Program coding
iv) Program compilation and execution
v) Program debugging and testing
vi) Program documentation

Problem analysis:
 It requires that we understand what we are being asked to do and identify
the information required to be computed and printed.

Algorithm development:
 After analyzing the problem and identifying the input/output data, the
problem is formulated into a carefully constructed list of statements called
algorithm that describes the sequence of manipulations to be performed in
carrying out the problem solution.

Program coding:
 After developing the algorithm of the problem, it is then coded using a
programming language that will make up the program.

Program compilation and execution:


 After coding the program, it needs to be translated into machine language for
execution.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 7 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Program debugging and testing:


 The program may not execute (compile or run) due to the program error or
bug. Therefore, the program is to be debugged, i.e., errors or bugs are to be
eliminated, till it executes successfully.
 Testing is a process of executing a program with the intent of finding an error.
Program documentation:
 It is the last step in designing a program that provides a written description of
each step of the program. It also provides operator’s manual, which supplies
procedural instructions so that the user can use the program.

What is Algorithm?
 A well-defined finite sequence of steps or instructions for solving a particular
problem is called algorithm.
 There are several algorithms or strategies for solving a given problem.
 The time and the space an algorithm uses are two major measures of the
efficiency of an algorithm.
 An algorithm should be sufficiently well structured and detailed, so that it can
be easily translated into some programming language such as C, ForTran,
Pascal, Basic etc.

Complexity of an Algorithm:
 The complexity of an algorithm is a function describing the efficiency of the
algorithm in terms of the amount of data the algorithm must process.
 There are two main complexity measures of the efficiency of an algorithm:
1) Time complexity
It is a function that describes the amount of time an algorithm takes in
terms of the amount of input to the algorithm.

2) Space complexity
It is a function that describes the amount of memory (space) an
algorithm takes in terms of the amount of input to the algorithm.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 8 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

What is Flowchart?
 Pictorial representation of an algorithm is called its flowchart.
 Flowcharts are composed of symbols of different sizes and shapes.
 The shape of the symbols used in flowchart determines the kinds of
operations being performed.
 The size of the symbols has no effects on its meaning and is determined
by how much is to be written inside it.

Purpose of Flowchart:
 The symbols used in flowchart are simple and easy to learn.
 Flowchart has many purposes:
i) Provide communication
ii) Provide overview
iii) Aid in algorithm development and experiment
iv) Check program logic
v) Facilitate coding
vi) Provide program revision
vii) Provide program documentation

Basic Symbols used in Flowchart


 Flowcharts are composed of symbols of different shapes and sizes. The
symbols have specific meaning and functions in a flowchart.
 Some ANSI (American National Standard Institute) symbols used in flowchart
are given below along with their name and meaning.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 9 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

SL Symbol Geometr Name in Meaning


N ic Name flowchart
o

01 Ellipse or Terminal This symbol is used to indicate the


Oval symbol beginning or end of an algorithm.
To specify which of the two is
intended, the word BEGIN or END is
written inside the symbol, as shown
below:
BEGIN END

02 Parallelo Input/Output This symbol is used to indicate the


gram symbol input or output of information to or
from the computer. The exact
operation (input or output) being
performed is specified by the
information inside the symbol as
shown below:
INPUT OUTPUT
X1, X2 X is larger

03 Rectangl Process symbol This symbol is used to indicate the


e assignment of values. The assigned
values may be a result of some
computation. Examples are given
below:
i=2 i=i+12

04 Diamond Decision This symbol is used to indicate a


symbol decision point i.e. the taking of
alternate action based on upon the
presence or absence of some
condition. The question inside the
diamond can be answered ‘yes’ or
‘no’ and ‘true’ or ‘false’. Examples
are given below:
No Yes
If X>Y

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 10 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

05 Circle Connector This symbol is used to connect flow-


symbol line and to identify flow-line’s going
to or coming from another place.
Typically, a number or letter or
combination thereof are written
inside the circle

06 Arrow Flow-line This symbol is used to indicate the


symbol order in which the steps of the
algorithms are to be carried out.
Here are some examples:

07 Open- Annotation/ This symbol is connected to the


ended Comments flow-lines of the flowchart by a
rectangl symbol broken line. It is used for
e descriptive comments, annotation,
remarks, explanatory notes etc
related to the flowchart where it is
helpful to provide additional
information.

What is Translator Program


 Translator is a computer program that performs the task of converting a
program written in one programming language into a program in another
programming language.

Kinds of Translator Program:


There are basically three types of translator programs. These are:
i) Assembler
ii) Interpreter
iii) Compiler

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 11 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY
PGD-101 (Introduction to IT and Programming) FOR PGDIT JULY 2016 INTAKE

LECTURE 1: PROGRAM & PROGRAMMING LANGUAGES


*******************************************************************

Assembler:
 It is a translator program that converts assembly language into machine
language.

Compiler:
 It is a translator program that translates the entire program at a time written
in high-level language into machine language.

Interpreter:
 It is a translator program that translates and executes each line at a time of
the source code program written in a high-level language into machine
language.

Comparison between Translator and Interpreter


 The compiler translates the entire program at a time while the interpreter
translates the single line at a time.
 Use of an interpreter can save more space since the program itself is quite
small in size.
 Compiler takes more space because of its long program.
 It is required less execution time in compiler than that of interpreter.
 It is required less main memory in case of an interpreter than that of a
compiler.

*******************************************************************
PREPARED BY: K M AKKAS ALI, B.SC. (HONORS) M.SC IN CSE PAGE 12 OF 12
ASSOCIATE PROFESSOR, IIT, JAHANGIRNAGAR UNIVERSITY

You might also like