CIS11011 Lesson 4
CIS11011 Lesson 4
Lesson 4
MJ Ahamed Sabani
Department of ICT
Faculty of Technology
SEUSL
1
Computer Program
2
Computer Programming
3
Computer Programming Languages
4
Classification of Computer Programming Languages
1st Generation
Languages
Low Level
Languages 2nd Generation
Languages
Computer
Programming 3rd Generation
Languages Languages
High Level
Languages 4th Generation
Languages
5th Generation
Languages
6
Low level programming languages
7
High level programming languages
8
1st Generation languages
■ Machine languages
■ Computer can use these instructions directly
■ CPU natively understand these machine codes
■ No translators needed
■ Very powerful code
■ Mainly uses 1s and 0s (bits)
■ Very difficult to write programs
■ E.g.
– MIPS instruction set
9
2nd Generation languages
■ Assembly languages
■ Short names used for instructions rather than the bits
■ Computers can not understand directly
■ It needs to be assembled to execute by computer
■ Assemblers can be used to translate
■ Mostly CPU specific programs
■ Very fast
10
3rd Generation languages
11
4th Generation languages
12
5th Generation languages
■ Declarative languages
■ Visually and graphically developed interfaces
■ Normally compiled with 3rd and 4th generation languages
■ Functional based instructions
■ Rule or mathematical logic based
■ E.g.
– Prolog, OPS5 and Mercury
13
Programming Language Translators
– However, the basic structure of computers knows only the language with
1s and 0s – Machine Languages
– All programs except machine languages need translators
Translator
Source Code Object Code
14
Programming Language Translators (contd.)
– Assembler
– Interpreter
– Compiler
15
Assembler
16
Interpreter
17
Compiler
18
Compiler and Interpreter
19
Major Programming paradigm approaches
■ Imperative programming
■ Declarative programming
20
Imperative programming
21
Declarative programming
22
Procedure oriented programming
23
Structured programming
24
Object oriented programming
25
Integrated Development Environment (IDE)
26
27