Languages Flashcards
(14 cards)
What are the 2 types of programming languages?
High-level and low-level
How are high-level programming languages written?
Written in a way similar to natural human language, i.e. English, making it easier to understand and use the language
Benefits of high-level programming languages
- Leads to fewer errors
- Allows for more powerful and complex commands
Drawback of high-level programming languages
Must be translated into machine code before it can be run, as they cannot be executed directly by the CPU
State examples of high-level programming languages
Python, Java, Visual Basic, C++
How are low-level programming languages written?
Do not closely resemble a natural human language
Drawback of low-level programming languages
Harder for humans to understand and write in
When are low-level programming languages used?
- When a program must be executed quickly
- When programmers need to write code that interacts directly with the hardware, e.g. device drivers
What are the 2 types of low-level languages?
Machine code and assembly language
What is machine code?
Pure binary code that computer processors can directly process and execute
Drawback of machine code
Extremely tedious and difficult for humans to understand and write in
Benefits of machine code
- Useful when a programmer needs to perform a very specific command that cannot be done in a high-level language
- Will be executed faster than high-level languages, as it is already in a format that that the CPU can execute and does not need to be translated
What is assembly language?
Uses specialised command mnemonics to perform actions
Benefits of assembly language
- Faster to execute than high-level languages, as it can be used to directly control the CPU
- Preferred over machine code by programmers, as it is easier to understand and spot errors