Classification of programming languages Flashcards
What is low level - (Generation 1)?
Machine code
What is Machine code?
Machine code is the set of binary instructions that are used by the CPU to perform a task. Machine code is processor dependent.
What is low level - (Generation 2)
- Assembly language
What is Assembly language?
Assembly language is a low-level programming language which is processor-dependent; each instruction is one machine operation.
What is High level language?
High-level language is a computer programming language based on natural language or mathematical notation.
What are examples of high level language?
Examples: C#, Python, Java
What is declarative language?
Declarative high-level languages are also based on natural language and are used to declare the necessary information to produce the required result.
What are examples of declarative language?
Examples: SQL, CSS, Prolog
What are procedural languages?
These languages, sometimes known as procedural languages, make use of subroutines and functions to aid readability and hence maintainability.
How do High level languages include imperative languages?
High-level languages include imperative languages, which is where the program statements or instructions are executed in a sequence or order as defined by the programmer.
How are low level languages imperative?
Low-level languages are imperative as all instructions are executed in a set sequence; each statement in an imperative high level is translated into numerous machine code statements prior to the execution of the code
What are the advantages of low level language compared to high level languages?
- Programming in low-level code can create faster and more efficient code as the programmer controls the performance level of the created code; with high-level programming there is a reliance on the compiler to create optimised code.
- Low-level language code is memory efficient due to the lack of abstraction in the code when compared to high level languages.
What are the disadvantages of low level language compared to high level languages?
- It is difficult to learn to program in low-level languages whereas high-level languages have more support and training options.
- High-level code can be self-documenting which makes it more understandable and so aids program maintenance and debugging.
- Machine-code and assembly programs are specific to a limited range of processors whereas high-level code can be compiled to run on a wide range of processors.