Low and High level languages

11.5.1.1 classify programming languages into low-level and high-level languages

11.5.1.2 compare high-level and low-level programming languages 

Low-level PL vs high-level PL

What is a 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 a computer's native language (binary), making them harder for programmers to understand.

High-level languages are written in a form that is close to our human language, enabling programmers to 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 usually becomes one line of machine code

Close to human language

Statements are easier to understand for humans 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 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 are complex and time-consuming processes.

Programs are more error-prone.

Programming usually results in poor programming productivity.

Programmers must have additional knowledge of the computer architecture of a particular machine for programming in low-level language.

It takes additional translation time 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 GURU, codeforwin.org

Questions:

  1. What is 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 PLs.
  4. Why do programs in low-level PL execute faster than programs in high-level PL?

Exercises:

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

Ex. 2 Identify advantages and disadvantages of low-level programming languages and high-level languages.

Exam questions:

Explain the 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),
  • whereas low-level languages are much closer to a format that a computer can understand (1).
Категория: Programming languages | Добавил: bzfar77 (14.09.2020)
Просмотров: 14410 | Теги: high level programming language, mnemonics, Instruction, Binary, low level programming language, machine code, assembly language | Рейтинг: 3.8/11
Всего комментариев: 0
avatar