Lesson 2 - Overview of Programming
Lesson 2 - Overview of Programming
Overview of
COMPUTER
PROGRAMMING
Mrs. Florencia R. Payawal
Teacher III
Sta. Lucia High School 1
Introduction to Programming
Program
❖ The term program refers to a set of instructions that
instructs a computer on what to do. Programs are
Solutions to Problems, and they are written using
programming languages.
❖ A program can instruct a computer to:
– Read/ accept Input data
– Calculate or compare
– Store data
– Write or display Output and communication messages.
❖ The term software refers to a computer program or set
of programs and its associated documentation such as
user guide, technical manual 2
Programming Languages
• Programming: This refers to the process of
writing computer programs using a programming
language.
• The person who write such instructions is a
programmer.
3
Programming Languages
4
Types of Programming Languages
5
Types of Programming
Languages
2. High-level languages further classified into
three generations namely:
– Third Generation- Procedural languages
– Fourth Generation - Problem-oriented
languages
– Fifth Generation - Natural languages
6
Low Level Languages
MACHINE LANGUAGES (1GL)
• This is the oldest form of computer programming.
Plug boards were used to represent data in binary
(machine) form in the computer circuitry. Data
represented in 1s and 0s are said to be written in
machine language. For example, the code below
represent a segment of a machine code:
– 1011010100
– 1010111101
– 1000100100
• Machine language also varies according to make of
computer – another characteristic that make them
hard to work with.
7
ASSEMBLY LANGUAGES (2GL)
Assembly language use mnemonics such as ADD
that are automatically converted to the appropriate
sequence of 1s and 0s by a translator called
assembler. Compared to machine languages,
assembly languages are much easier for humans to
understand and to use. The machine language code
we gave above could be expressed in assembly
languages as:
ADD 210(8,13),02B(4,7)
PACK 218(8,13),02F(4,7)
MP 212(6,13),21D(3,13)
8
Advantages of low-level programming
languages
1. They are executed very fast since no translator
or minimum translation is involved.
(Compiler/Interpreter)
10010101001010001010100
Object Code 10101010100011101111011
(machine language)) 10110111100011100101011
13
PROBLEM-ORIENTED LANGUAGES
(4GL)
• Unlike general purpose languages, problem-oriented
languages are designed to solve specific problems.
While 3rd GLs focus on procedures and how a
program will accomplish a specific task, 4th GLs are
non-procedural and focus on specifying what the
program is to accomplish. 4th GLs are more
English-like, easier to program, and widely used by
non-programmers . Some of these 4thGLs, are used
for very specific applications. 4th GLs includes query
languages e.g. SQL and application generators eg
Visual Basic 14
NATURAL PROGRAMMING LANGUAGES
(5 GL)
• As they have evolved through the generations, computer languages have
become more human-like. Clearly, the fourth-generation query languages
using commands that include words like SELECT, FROM and WHERE, is
much more human-like than the 0s and 1s of machine languages. However,
5th GLs are still long way from natural languages such as English and
Spanish that people use.