0% found this document useful (0 votes)
3 views

Programming Languages

The document provides an overview of programming languages, detailing their generations from 1GL to 4GL, and classifying them into low-level and high-level languages. It explains the role of language translators such as assemblers, compilers, and interpreters, and outlines the steps involved in problem-solving and algorithm development. Additionally, it introduces flow charts as a graphical representation of algorithms, including standard symbols used in flow charting.

Uploaded by

Suharda Harasara
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Programming Languages

The document provides an overview of programming languages, detailing their generations from 1GL to 4GL, and classifying them into low-level and high-level languages. It explains the role of language translators such as assemblers, compilers, and interpreters, and outlines the steps involved in problem-solving and algorithm development. Additionally, it introduces flow charts as a graphical representation of algorithms, including standard symbols used in flow charting.

Uploaded by

Suharda Harasara
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Programming Language - Grade 11 ICT

Introduction to Programming Languages


The purpose of a language is to allow people to communicate. Unfortunately computer at present are not
intelligent enough to understand human language, because of this scientist have developed computer friendly
languages. Using such a computer language you can communicate with computer. More specifically you could
instruct the computer to perform a particular task.

What is a computer Language?


A computer language is a set of symbols and rules used in constructing programs.

Generation of programming languages


◼ 1st Generation language (1GL)
◼ 2nd Generation languages (2GL)
◼ 3rd Generation languages (3GL)
◼ 4th Generation languages (4GL)

1st Generation languages (1GL)


◼ All commands are based on binary codes symbols 0 and 1
◼ Machine-level programming language
◼ The machine can directly execute the machine code
◼ Execution is speedy because no translators are used
◼ It is very difficult to write and modify programs.
◼ It is a machine-dependent language.
◼ It is a low-level language.
EX: Machine Language

2nd Generation languages (2GL)

Assembly language is used

◼ Assembler is used to convert assembly language into machine language


◼ Mnemonics and variables are used to write codes
◼ It is a machine-dependent language
◼ Difficult to write and modify programs
◼ It is a low-level language
◼ Execution is fast
EX: Assembly Language

3rd Generation languages (3GL)

◼ It is easy to understand because it is similar to human languages.


◼ Compilers or interpreters are used as translators.
◼ It is easy to write and modify programs.
◼ They are not machine-dependent languages.
◼ It is a High-level language
◼ Some of the 3rd generation languages are unstructured languages such as Basic

Ex: BASIC, FORTRAN, COBOL, Pascal, Java, C++, Visual Basic, Python

O/L ICT Suharda Harasara Page 1


Programming Language - Grade 11 ICT

4th Generation languages (4GL)

◼ Artificial Intelligence is used in these languages


◼ It consumes less time to write a program
◼ Very easy to write and modify.
◼ It is a High-level language
EX: Prolog, LISP

Classification of Programming Languages


1 Low-Level Languages

First and second-generation languages are considered low-level languages.

EX: Machine Language

Assembly Language

2 High-Level Languages

◼ 3GL and 4GL are considered high-level languages

EX: BASIC, FORTRAN, COBOL, Pascal, Java, FOCUS, IDEAL, dbase III plus, Visual Basic, C++, Small

Talk, Visual.net, Prolog, LISP

Language Translator
Translators are used to convert source code into machine (object) code. These are three types of translators.

Assembler
Compiler
Interpreter

Translator Machine Language


Source Code Machine code/Object Code

O/L ICT Suharda Harasara Page 2


Programming Language - Grade 11 ICT

Assembler

◼ It is a low-level language Translator.


◼ It is a software program that converts assembly language into machine language.
◼ Converts Mnemonics into machine code
EX: Assembly language

Compiler

◼ It is a translator of high-level languages


◼ Converts a whole program into machine language at once

EX: Pascal, Visual Basic

Interpreter

◼ It is a translator of high-level languages


◼ Translate source code into machine code line by line
EX: Python
Solving Problems
Steps of solving a problem

1 Understanding the problem/Analysing the problem


2 Developing an Algorithm for the problem
3 Cording Programme

4 Testing and debugging

5 Execute the program on the input data

(Understanding the problem/Analysing the problem)

The raw materials that are used to solve a problem are known as the 'input'. The result obtained after solving a
problem is known as the 'output'. Converting input to output is called the 'process'. A process takes place step by
step and it is very important to understand the order of process. When analyzing a problem, the input,
processing and output are identified separately.

Problem : Preparing a letter that can be posted.

Input : A sheet of paper, suitable to write the letter on, a pen, an envelope, a stamp, and Glue

Process 1. Writing the letter


2. Folding the letter and putting it into the envelope
3. Pasting the envelope
4. Write the recipient's address on the envelope 5. Sticking the stamp

Output : A letter ready to be posted.

O/L ICT Suharda Harasara Page 3


Programming Language - Grade 11 ICT

Note : Steps No. 4 and 5 in this process can be interchanged. However, the other steps should be
followed in the order indicated.

Problem: Finding whether a number is odd or even

Input: Number

Process: Dividing the number by 2


Deciding that the number is even if the remainder = 0
Deciding that the number is odd if the remainder = 1

Output: Indicating whether the number is odd or even

(Identifying the alternative solutions?)

All the solutions pertaining to a problem are called solution space. In computer programming also, various
solutions should be identified, and an appropriate solution should be selected. Then we can create a short, simple
programmer.

(Developing an Algorithm for the problem)

What is an Algorithm
An algorithm is a step-by-step procedure for solving a problem. (An algorithm is a method to show the steps in
solving a problem)

(Developing an algorithm to post a letter.)


• Write the letter
• Folding the letter
• Inserting the letter in an envelope
• Writing the address
• Sticking the stamp
• Posting the letter

Representation of Algorithm

1 Graphical Representation

2 Textual Representation

Flow Charts
A flow chart is a graphical representation of an algorithm. Each step in the flow chart is represented by a designed
symbol and is linked with arrows showing the direction of data flow. A standard set of symbols has been
introduced to be used in flow charts.

O/L ICT Suharda Harasara Page 4


Programming Language - Grade 11 ICT

Symbols Used in the Flow chart


1 Start/Stop, Begin/End
Terminator

2 Input/ Output

3 Process

4 Connector

5 Decision

6 Flow Lines/Flow direction

O/L ICT Suharda Harasara Page 5

You might also like