Download presentation
1
CONCEPTS OF PROGRAMMING LANGUAGES
Week 11 Session by Manesh T
2
Session Objective Introduction To Computer Program or Language
Levels of Computer languages Language Processors Generations of Computer Programming Types of Programming Languages
3
What is a Programming Language?
A set of rules or instrcutions A set of rules for converting an algorithm A language framework for describing computations Symbols, words, rules of grammar, rules of semantics Syntax and Semantics Algorithm Flowchart Programs
4
Levels of Programming Languages
class Triangle { ... float surface() return b*h/2; } High-level Language LOAD r1,b LOAD r2,h MUL r1,r2 DIV r1,#2 RET Assembly Level Language Machine level Language
5
Levels of Programming Languages-Cond
6
Programming Languages (cont’d)
A Machine language program consists of a sequence of zeros and ones. Each kind of CPU has its own machine language. Advantages Fast and efficient Machine oriented No translation required Disadvantages Not portable Not programmer friendly
7
Assembly Language Assembly language programs use mnemonics to represent machine instructions Each statement in assembly language corresponds to one statement in machine language. Assembly language programs have the same advantages and disadvantages as machine language programs. Compare the following machine language and assembly language programs: 8086 Machine language program for var1 = var1 + var2 ; 8086 Assembly program for MOV AX , var1 ADD AX , var2 MOV var1 , AX
8
High-Level Programming Languages
A high-level language (HLL) has two primary components (1) a set of built-in language primitives and grammatical rules (2) a translator A HLL language program consists of English-like statements that are governed by a strict syntax. Advantages Portable or machine independent Programmer-friendly Disadvantages Not as efficient as low-level languages Need to be translated Examples : C, C++, Java, FORTRAN, Visual Basic, and Delphi.
9
Language processors Assembler Compiler Interpreter
converting Assembly to machine High level language to machine language Line by line compilation Debugging is easy Debugging is faster Debugging is slow E.g,: TASM E.g. TC computer Eg: BASIC
10
Beyond Fifth Generation Languages
Some talk about Agent Oriented Programming Aspect Oriented Programming Intentional Programming Natural language programming Maybe you will invent the next big language
11
Generations of Programming Languages
First Generation Languages Machine Second Generation Languag es Assembly LOAD x ADD R1 R2 Third Generation Languages High-level imperative/object oriented public Token scan ( ) { while (currentchar == ‘ ’ || currentchar == ‘\n’) {….} } Fourth Generation Languages Database select fname, lname from employee where department=‘Sales’ Fifth Generation Languages Functional Logic fact n = if n==0 then 1 uncle(X,Y) :- parent(Z,Y), brother(X,Z). else n*(fact n-1) Fortran, Pascal, Ada, C, C++, Java, C# SQL Prolog
12
Types of Programming Languages
Procedural Programming Languages Structured Programming Languages Object-Oriented Programming Languages
13
Programming languages
14
Assembly Language- Features
In this whole problem is solved as a single block. This is suitable only for small problem. Difficult to follow and correct errors Eg, Assembly Language, BASIC.
15
procedure Programming
Features of procedure oriented Programming: Large Programs are divided in to small function or Procedure. Uses Top-Down programming Approach. Data moves freely from one function to another. Most of the functions share common data. Emphasis is given for algorithms. Disadvantages: Very difficult identify which data is used by which function. Error Correction is difficult. Example: C, Pascal
16
Structured Programming
The program is divided into modules and the modules are then divided into functions. Each module can work independent of one another. Example: ADA, Prolog
17
Object oriented programming
The Program is divided into number of small units called Object. The data and function are build around these objects. The data of the objects can be accessed only by the functions associated with that object. The functions of one object can access the functions of other object. Example: C++, Java
18
Object oriented programming
19
Object oriented programming
20
Features of object oriented
Emphasis is given on data rather than procedures. Problems are divided into objects. Data structures are designed such that they organize the object. Data and function are tied together.
21
Possible Questions What are levels of Programming Languages?
Illustrate difference between Assembler and Compiler What are features of Procedural Languages What are features of Structural Languages What are features of Object oriented Languages
22
Thank you! End of Presentation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.