PSPD BAB1 Part2 PDF
PSPD BAB1 Part2 PDF
INTRODUCTION TO PROGRAMMING
LANGUAGE
(part 2)
Once this
question
arise …
Programming ??
Is performed to solve a Programming
specific problems
Programming
A planning process for a
Concepts sequence of instruction to
be executed by the
computer
Terminologies
Person C :
• The TRANSLATOR
• Knows how to speak both
Malay & Japanese Language
Scenario Overview
To help you understand,
let us discuss situation
below :
C
1. Will they
manage to
A B
communicate?
2. How?
• Translates a computer program
(source code) into machine
Translator language (object code) that the
computer can understand.
is.. • Checks syntax of a program to
ensure the programming
language is used correctly, by
giving you the syntax-error
Why do we
< to realize that every
need one? This language is called
CPU understands only
machine language.
one language! >
TRANSLATOR
why
would we 2. different CPU family = different machine
language
• because of this; machine language programs
need are inherently non-portable
Compiler
A software system that
translates programs (HLL)
Types
Interpreter
Executes other programs
directly, running through
program code and executing
it line-by-line.
Let’s recall back See how the translator play it’s role in
to this example translating human like language (HLL)
into machine language?
ASSEMBLER
11110
sseg segment stack db 256 dup(?)
sseg ends
10111000
data db “2 x 4 = ” 11111100
dseg ends
Assembler 10111000
The Concepts :
Grace Hopper
COMPILER
# include <stdio.h>
{ 11110
return 0;
}
C Language Machine Langeage
INTERPRETER
• Topic :
Programming Languages
Real Life Applications
• Base on your understanding :
• List ONE example of Real-
Life Applications of
Programming Language
• Briefly explain the
example.
End of
Lecture 1 – Part 2
Topic :
Problem Solving Methods