THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY
1
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY
Machine Languages
▪ Machine language instructions are binary coded and
very low level.
Assembly Languages
▪ Assembly language allows symbolic programming.
Requires an assembler to translate assembly
programs into machine programs.
High-level Languages
▪ High-level language provides a very high conceptual
model of computing. Requires a compiler to translate
high-level programs into assembly programs.
2
Memory Addresses Machine Language Assembly Language
Instructions Instructions
00000000 00000000 CLA
00000001 00010101 ADD A
00000010 00010110 ADD B
00000011 00110101 STAA
00000100 01110111 HLT
00000101 ? A?
00000110 ? B?
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 3
Language Application Area Origin of Name
FORTRAN Scientific Programming Formula Translation
COBOL Business data processing Common Business-
Oriented Language
LISP Artificial Intelligence List Processing
C Systems programming Predecessor language
was named B
C++ Objects and object-oriented Incremental
programming modification of C
Java Supports Web programming Originally named “Oak”
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 4
Word
Processor
Source File
(editor) Used to
Format:text
type in program
and corrections
Compiler
Attempts to Object File
Error messages translate Format:binary
program into
machine code
Linker
Resolves cross-
Executable File
Other Object File references
(load module)
Format:binary among object
Format:binary
files
Input data Loader
Copies
executable file
Results Computer into
memory;initiates
execution of
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY instructions 5
Major steps to be followed for solving
problem:
1) Preparing hierarchy chart
2) Developing algorithm
3) Drawing flowchart
4) Writing Pseudocode
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY
6
shows a top-down solution of a problem
the problem is decomposed into several
parts, each representing a small task
which is easily comprehensible and
solvable.
modular programming
▪ each subtask is treated as a module and
prepared computer code for testing
independently
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 7
Payroll
Problem
Compute Compute Compute
Gross Pay Deductions Net Pay
Compute Compute Compute
PF Loans IT
Fig. 1: Hierarchy Chart for Payroll Problem
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 8
a sequence of steps written in the form of English phrases that
specify the tasks that are performed while solving a problem.
a finite set of instructions that specify a sequence of operations
to be carried out in order to solve a specific problem or class of
problems
helps a programmer in breaking down the solution of a
problem into a number of sequential steps. Each corresponding
step is written in a programming language.
3.) Flowchart
a graphical representation of the flow of control and logic in the
solution of a problem.
a pictorial representation of an algorithm.
4.) Pseudocode
uses generic syntax for describing the steps to be performed for
solving a problem.
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 9
is a problem solving method used in
programming
1. Specify the problem requirements
2. Analyze the problem
3. Design the algorithm to solve the problem
4. Implement the algorithm
5. Test and verify the completed program
6. Maintain and update the program
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 10
is a design tool used to represent the logic in a
solution algorithm graphically
a means of visually presenting the flow of data
through an information processing systems, the
operations performed within the system and the
sequence in which they are performed.
a pictorial representation of a process
a diagram representing the logical sequence in
which a combination of steps or operations is to
be performed
a “blueprint” of the program
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY
11
1. Sequence – process is executed from one to
another in a straightforward manner.
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY
22
2. Selection (if-then-else) – a choice is provided
between two alternatives.
TASK 1
TASK 2
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 23
3. Repetition (Looping)
▪ Do-while – this structure
provides for the
repetitive execution of C
an operation or routine F
while the condition is
true. The condition is T
evaluated before LOOP
executing any process A
statement. As long as
the condition is true, the
process is executed,
otherwise, control flows
out of the structure.
THIS LEARNING MATERIAL IS FOR PRIVATE USE ONLY 24