1/14
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Why were low-level languages written?
The limited speed and memory of early computers
- Directly manipulated the processor
- Required a great deal of effort
- Prone to errors
What are the types of low level language?
- Machine code
- Assembly language
What is machine code?
Code that directly manipulates the processor
→ Only uses 1s and 0s to represent instructions
What makes up machine code?
- Opcode (instruction)
- Operand (data used to carry out the instruction
What are the advantages of using machine code?
- Very powerful due to its direct manipulation
- No need to translate
What are the disadvantages of using machine code?
- Very long
- Difficult to read and understand
- Prone to errors
- Difficult to debug
What is machine code suited to?
Embedded systems
- Low processing power
- Speed of execution is important
What is assembly language?
Language that makes use of mnemonics in place of binary instructions
What are the advantages of using assembly language?
- More compact
- Less error-prone
- 1-to-1 correlation to machine code
What is a high-level language?
A programming language that is close to human speech
→ e.g. Python
What are the advantages of using high level languages?
- Easier to learn and understand
- Easier to debug
- Not platform specific
What are the disadvantages of high-level languages?
- Must be translated into machine code before use
- Object code may run slower
- Cannot manipulate individual bits
What makes high-level programming easier to debug?
- Named variables
- Indentation
- Commenting
- In-built functions
What is an imperative language?
Focus on how a problem should be solved
→ Requires step-by-step instructions
What is a declarative programming language?
Focus on what needs to be done, rather than how to do it