Classify and generation PL

Download Report

Transcript Classify and generation PL

CATEGORIES AND CLASSIFICATION
OF PROGRAMMING LANGUAGES
LEARNING OBJECTIVES:
▶ distinguish between generations of programming languages
▶ classify programming languages into low and high-level
▶ Analyze the advantages and disadvantages of high-level
languages
▶ Analyze the advantages and disadvantages of low-level
languages
EVALUATION CRITERIA:
Knowledge
▶ Name generation of programming language;
▶ Give differences between HLL&LLL;
Comprehension
▶ Explain using LLL;
▶ State differences between machine code & assembler;
Application
▶ Write simple LLL programs;
Analysis
▶ Define the level of the code programming languages.
DISCUSSION
What are programming languages?
Which PL you have experience in?
What are the differences between Objectoriented and structured PL?
SEARCH INFORMATION AND MAKE A
POSTER
1 group
2 group
1. How many generations of PL
exist?
2. What programming
languages ​are considered to be
of high level?
3. When (year) did PL start first
to be developed?
4. When (year) were the 1,2
generation
programming languages
​created?
5. Find examples for 1-2
generation of PL
1. Which PL are considered to
be the 3rd generation, the 4th
generation.
2. Who is the first programmer?
3. When (year) were the 3,4,5
generation
programming languages
​created?
4. Find examples for 3-5
generation of PL
From our brain to the CPU
ACTIVITY (AIZADA WILL TRANSLATE
ANd DO IT)
▶ https://learningapps.org/watch?v=pcz6e3g6j01
CLASSIFY PROGRAMMING LANGUAGE HIGH
LEVEL AND LOW LEVEL
FILL IN THE TABLE / PAIR WORK
High level languages
Generation
Year of establishment
Pros
Cons
Situations where their
application is effective
Reasons to application
Low level languages
Programming Languages
Difference between high level and low level code…
Machine Code (Very Low Level Language)
The computer can understand only one type of code:
Machine Code
Made up of Coded Instructions and Data
e.g. 01001100 (binary)
Or
B8200 (hexadecimal)
High Level Language
Assembly Language
Machine Language (Code)
Hardware (CPU)
Each piece of machine code is stored as a binary
number.
This means that writing programs in ‘Machine Code’ is
difficult for a human to do.
Programming Languages
Difference between high level and low level code…
Assembly Language (Low Level Language)
To overcome this issue, assembly language was created.
This language has a small set of commands which represent certain pieces of machine
code
This helped programmers as they didn’t have to remember sets of binary code,
instead they learnt commands.
Instead of 1011 or 1001, they just had to remember commands like ADD and SUB
These commands are known as Mnemonics (simple memory aids).
Assembly language is still quite difficult to learn and use and this is why High Level
Languages were produced.
(Due to less code, assembly language can be processed by the CPU far more
quickly than high level languages)
High Level Language
Assembly Language
Machine Language
(Code)
Hardware (CPU)
Machine Code
Mnemonic Code
B80200
MOV AX, 0002
BB0400
MOV BX, 0004
01DB
ADD AX, BX
CD20
INT 20
Programming Languages
Difference between high level and low level code…
High Level Languages (Python, Java, C++ etc)
High level code (aka ‘source code’) is far more easy to write and therefore for humans to understand.
Its purpose is to be easier to write AND STILL be easily translated into machine code so that it can be
processed by the CPU.
To help it be translated, it makes use of:
KEY WORDS
and
SYNTAX
(rules for the keywords and arguments that go with them)
High Level
Language
Assembly
Language
Machine Language
(Code)
Hardware (CPU)
Using keywords as opposed to any old English means that
translations can happen – reserved words such as PRINT are known to translators
where as ‘put on screen’ is not etc.
Binary:
▶
All a computer can understand is if electricity is active or not.
▶
Binary is a language that consists of 1 and 0
▶
1 means electricity is on
▶
0 means electricity is off
▶
You use a sequence of binary digits to create something useful
Differences
Low level language
▶
▶
▶
▶
▶
▶
More difficult to learn
Very hard to read
Potentially quicker programs
Easier to talk to hardware
Directly Interact with the
Hardware
Harder to modify and
maintain
High level language
▶
▶
▶
▶
▶
▶
▶
Easier to maintain
Translation takes time
Similar to English
Has to be translated
Easier to learn
User friendly
Less time to write
▶
▶
▶
High-level languages include Java, JavaScript, C++, Ruby,
BASIC or Python, while low-level languages include assembly
language, and machine code.
A computer's CPU only understands (executes) series of
binary numbers - so all programming languages are
converted into binary code. Low-level instructions can be
processed more speedily than high-level languages, but they
are more difficult for people to read and write.
For major web applications and powerful games, developers
need to know how to code in low-level languages in order to
maximize the speed and efficiency of a program. Modern
games are typically programmed using a variety of languages.
Classification of programming
languages (PL).
1st generation
Low level
languages
Programming
languages
High level
languages
2nd
generation
3rd
generation
4th
generation
Generations of Programming
Languages
Generation
Language / Type
1
Machine language (Machine code)
2
Assembly language (Assembler)
3
Imperative languages (Basic, C,
Python, Pascal, Java, Ruby, Fortran
COBOL)
4
Logic languages (SQL, Prolog, HTML,
CSS)
Activity
▶
Study about the classification of PL on the Internet and give any
examples of PL for each generation
Vocabulary
ENGLISH
РУССКИЙ
High level language
Язык высокого уровня
Low level language
Язык низкого уровня
Machine code
Машинный код
Assembler
Ассемблер
Generation
Поколение
Execute
Выполнять
Binary
Двоичный код
Reflection
▶
▶
▶
What knows?
What remained unclear
What is necessary to work on
QQQ