Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
22 views

Section 1 - Generations of Programming Languages

Uploaded by

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

Section 1 - Generations of Programming Languages

Uploaded by

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

Section 1 – Generations of Programming Languages

A programming language is a computer language engineered to create a standard form of


commands. These commands can be interpreted into a code understood by a machine.

TYPES OF PROGRAMMING LANGUAGES


LOW – LEVEL PROGRAMMING LANGUAGE
Low-level language is a programming language that deals with a computer's hardware components
and constraints. Low-level programs are written in machine language and can only be run on the
machine on which it was written, thus being classified as machine dependent.
HIGH – LEVEL PROGRAMMING LANGUAGE
These are programming languages that are not machine dependent as low level programming
languages. This means that programs created on one computer can be used on another computer.

ADVANTAGES OF LOW LANGUAGES


 The main advantage of programming in 1GL is that the code can run very fast and very efficiently.
 The instructions are executed directly by the CPU.
DISADVANTAGES OF LOW LANGUAGES
 One of the main disadvantages of programming in a low level language is that when an error
occurs, the code is not as easy to fix.
 Programmers tend to get confused with the magnitude of 1s and 0s.
ADVANTAGES OF HIGH LEVEL LANGUAGES
 They possess friendly interfaces
 They can be used to create databases
 They can be used to create websites
 They can be used to generate reports

DISADVANTAGES OF HIGH LEVEL LANGUAGES


 Run slower than those of earlier language generations because their machine code is longer and
more complex
 These programs can be very “wordy”

CATEGORIES OF GENERATION OF LANGUAGES


Low level languages
 First Generation (1GL) – Machine language
 Second Generation Language (2 GL) – Assembly Language
High level languages
 Third Generation (3GL)
 Fourth Generation Language (4GL)
 Fifth Generation Language (5GL) – Natural Language

1
A first generation (programming) language (1GL) is a grouping of programming languages that
are machine level languages used to program first-generation computers. It is also known as 1st
generation language or machine level language. The instructions are made of binary numbers,
represented by 0s and 1s.

A second generation (programming) language (2GL) or assembly-level language use instructions


that are written using mnemonics or abbreviated forms of words. For example, it uses words like
ADD for addition and SUB for subtraction.

A third generation (programming) language (3GL) is a grouping of programming languages that


introduced significant enhancements to second generation languages, primarily intended to make the
programming language more programmer-friendly.

A Fourth generation language It is a domain specific language (database management systems -


DBMSs), or a high productivity language.
A fifth generation language is a natural programming that uses a visual or graphical development
interface.

EXAMPLES OF GENERATIONS OF PROGRAMMING LANGUAGES

GENERATION LANGUAGE Example ( Fragmented Code)


1st BINARY 1101010011
(Machine Level)
2nd ASSEMBLY movax,@data
movds,ax
movah,9
3rd FORTRAN READ(5, 501) A, B, C
3rd JAVA Class HelloWorldApp
3rd C Print(“Hello world!\n”);
3rd COBOL ACCEPTNum1.
ACCEPTNum2.
3rd PASCAL WriteLn(‘Input number 2: ’);
ReadLn(Num2);
3rd BASIC 45LET S = S + V(I)
4th SQL FIND ALL RECORDS
WHERE AGE IS "18"
5th PROLOG Barks (S parky, X):- walks (X, quickly).

2
CATEGORIES OF PROGRAMMING LANGUAGES

Java is an object-oriented language (language that is organized around "objects" rather than
"actions") similar to C++ , but simplified to eliminating language features that cause common
programming errors.
Structured Query Language (SQL) is a standard computer language for relational database
management and data manipulation. SQL is used to query, insert, update and modify data.
PROgramming LOGic (PROLOG) It uses a form of mathematical logic (predicate calculus) to solve
queries on a programmer-given database of facts and rules.
C is a high-level and general purpose programming language that is ideal for developing firmware or
portable applications.
COBOL (COmmon Business-Oriented Language) is a business-based programming language
designed for exclusive use in mainframe computers.
Pascal is a reliable and efficient programming language; it is mainly used to teach programming
techniques. It uses control structures with reserved words which include if, then, else, while, etc.
Beginner's All-purpose Symbolic Instruction Code ( BASIC) is primarily used as a tool for teaching
fundamental programming principles.
FORmula TRANslator (FORTRAN) Is a programming language designed for numeric computation and
scientific computing.
An assembly language is a low-level programming language for microprocessors and other
programmable devices.
A Binary Digit (Bit) is the smallest unit of information in a computer. It is used for storing information
and has a value of true/false, or on/off.

3
PROGRESS QUIZZES - (54 marks)

1. Name the generations of programming languages: (3 marks)

2. ________________ belongs to 5th generation languages. (1 mark)

3. The instructions in ______________________ language are made of binary numbers,


represented by 0s and 1s. (1 mark)

4. Name SIX high-level programming languages and describe them. (12 marks)

5. With ____________________ languages, programs can be written symbolically, using English


words. (1 mark)

6. C + + is considered a ______________ language. (1 mark)

7. Expand of the following abbreviations: (4 marks)


a. BASIC b. FORTRAN c. COBOL d. BIT

8. Procedural languages are part of the generations of computer language except ______. (1 mark)

9. Give THREE examples of third generation languages. (3 marks)

10. A high-level language is categorized as a ________________ to _______________.(2 marks)

11. Second generation languages are converted into machine language by a / an ________. (1 mark)

12. _________________ is a computer term, symbol or name used to define or specify a computing
function. (1 mark)
13. _________________ language is suitable for machines to understand but very difficult for the
human programmer to interpret and learn. (1 mark)

14. ________________ language is a domain specific language (Database Management Systems –


DMMS), or a high productivity language. (1 mark)

15. A low-level language is categorized as a ________________ to _______________. (2 marks)

16. Say what languages are the following codes written in: (4 marks)
a. ADD XY, 60 b. 11100110 c. ACCEPTNum3 d. Print(“HIThere!\n”);

17. The most recent type of programming language is __________________. (1 mark)

18. A (an) ____________ converts the programmer’s procedural language program into machine
language. (1 mark)

4
19. _______________ languages require the use of objects. (1 mark)

20. The computer speaks one main language, which is _____________ language. (1 mark)

21. Programming languages can be classified as ____________ and _____________. (2 marks)

22. What programming code is the following computer program written in? (1 mark)

23. Study the programming code in Question 22 and state which line does the following: (3 marks)
a. Processing
b. Storage
c. Output

24. Study the programming code in Question 22 and state which line(s) do / does the following:
(5 marks)
a. Input
b. Prompting
c. Declares variables

You might also like