Problem Soving, Topic1, Intro Programming Languange PDF
Problem Soving, Topic1, Intro Programming Languange PDF
INTRODUCTION TO PROGRAMMING
LANGUAGE
(Part 1)
Language ??
Interaction
HUMAN LANGUAGE
:: BAHASA MELAYU ::
:: BAHASA INGGERIS ::
:: BAHASA CINA ::
< Simple said >
:: BAHASA TAMIL :: Programming
Language is
How human interact medium of
interaction
between human
and computer
Interaction
2
Second Generation
1
First Generation
Year
1960 1970 1980 1990
Evolution of
Programming Click here
Languages
1st GL
• Machine language is
machine-dependent.
• A written program for
one computer generally
cannot be executed on
another.
• For example, a
program written in
Apple PC cannot be
run in IBM PC.
Example
Question?
Can you think of any other
real-life application that
may use this concept?
2nd GL
• Known as Assembly Language
• A program which consists of a series of instructions--
mnemonics that correspond to a stream of executable
instructions
• It needed assembler to translate the instruction to
machine language before it can be loaded into memory
and executed.
-Instead of
entering the
numbers into
memory:
54 24 66 9C FE
C2 84 92
- The assembly
language
programmer
can write
something like
this:
LDX 24, [669C]
• Example
Machine language: 10110000 01100001
2nd GL (Hexadecimal: B0 61) convert to:
Assembly language: MOV AL, #61h.
Question?
Can you think of any other
real-life application that
may use this concept?
• Its an imperative language
• Brought many programmer-friendly features to
code such as loops, conditionals, classes etc.
• one line of third generation code can produce
many lines of object (machine) code, saving a
lot of time when writing programs.
Imperative languages - code is executed line by line, in a
programmer defined sequence
3rd GL
3rd GL
• Need
Translator(Interpreter
or compiler) to convert
high level language to
machine language
• Ex : Basic, Fortran,
Cobol, Pascal, C
4th GL
LOW LEVEL
PROGRAMMING • Is a programming language that provides
LANGUAGE little or no abstraction of programming
concepts.
• It is very close to writing actual machine
instructions.
• Examples of low-level languages are
assembly and machine code.
3rd generation and above are
considered as the HLL.
HIGH LEVEL
PROGRAMMING • Is a programming language with strong
LANGUAGE abstraction from the details of the
computer.
• In comparison to low-level programming
languages
• it may use natural language elements
• be easier to use
• be more portable across platforms
Class Activity 1
• Topic :
✓ Programming
Languages
• Base on your
understanding
✓ Draw a simple mind
map to describe the
hierarchy of
programming
language generations
and group them base
on their levels.
✓ Give ONE suitable
example for each
generation language.
Summary
Topic :
Describe fundamentals of
programming languages