Low and High level languages

11.5.1.2 classify programming languages into low and high-level

11.5.1.5 advantages and disadvantages of high-level languages 

11.5.1.6 advantages and disadvantages of low-level languages 

Low and High level languages

What is programming language (PL)?

A programming language is a vocabulary and set of grammatical rules for instructing a computer to perform specific tasks.

A programming language is a set of commands, instructions, and other syntax use to create a software program.

According to Wikipedia, there are about 700 programming languages.

A computer program is a list of instructions that enable a computer to perform a specific task.

Programming languages are basically classified into two main categories – Low level language and High level language. 

Computer programs can be written in high and low level languages, depending on the task and the hardware being used.

Difference between low level PL and high level PL

Low level PL High level PL

Low level languages are used to write programs that relate to the specific architecture and hardware of a particular type of computer.

They are closer to the native language of a computer (binary), making them harder for programmers to understand.

High level languages are written in a form that is close to our human language, enabling to programmer to just focus on the problem being solved.

No particular knowledge of the hardware is needed as high level languages create programs that are portable and not tied to a particular computer or microchip.

These programmer friendly languages are called ‘high level’ as they are far removed from the machine code instructions understood by the computer.

Closer to the natural language of a computer (binary)

Often relates to the specific architecture and hardware of a particular type of computer

One line of low level code of usually becomes one line of machine code

Close to human language

Statements are easier to understand for human than a low level language 

No knowledge of a computer hardware is needed

Portable (can be used on different types of computers)

One line of high level code of usually becomes many lines of machine code

Examples: Machine Code, Assembly Language

 

Examples: C++, Java, Pascal, Python, Visual Basic, ... .

Advantages and disadvantages of low and high level languages

  Low level PL High level PL

Advantages

Can make use of special hardware or special machine-dependent instructions (e.g. on the specific chip)

Translated program requires less memory

Write code that can be executed faster

Total control over the code

Can work directly on memory locations

Easier to modify as it uses English like statements

Easier/faster to write code as it uses

English like statements

Easier to debug during development due to English like statements

Portable code – not designed to run on just one type of machine

Disadvantages

Programs developed using low level languages are machine dependent and are not portable.

Error detection and maintenance is a tedious and time taking process.

Low level programs are more error prone.

Low level programming usually results in poor programming productivity.

Programmer must have additional knowledge of the computer architecture of particular machine, for programming in low level language.

It takes additional translation times to translate the source to machine code.

High level programs are comparatively slower than low level programs.

Compared to low level programs, they are generally less memory efficient.

Cannot communicate directly with the hardware.

 

Sources: Computer Science GCSE GURUcodeforwin.org

Questions:

  1. What the main difference between low-level PL and high-level PL?
  2. Which low-level language can a computer understand without translation?
  3. Name three high-level PL.
  4. Why do programs of low-level PL execute faster than programs of high-level PL?

Exercises:

Ex. 1 (Author: Litvinova Olga - CS teacher of NIS Pavlodar)

Ex. 2

Exam questions:

Explain difference between high-level programming languages and low-level programming languages. (Marks: 2)
  • Humans use high-level languages to write programs, which must then be translated before a computer can understand them (1), w
  • hereas low-level languages are much closer to a format that a computer can understand (1).
Категория: Programming languages | Добавил: bzfar77 (14.09.2020)
Просмотров: 372 | Теги: high level programming language, mnemonics, instruction, Binary, low level programming language, machine code, assembly language | Рейтинг: 0.0/0
Всего комментариев: 0
avatar