2.5.1 - Languages Flashcards
What is a high level language?
A language close to human syntax. Not specific to any hardware so can be translated for use on any other system. They have to be translated before they can be executed
Advantages of high level languages
- Ease of use
- Easy to understand
- Easy to communicate with other programmers
Disadvantages of high level languages
- Increased memory usage
- Require more processing power
Examples of high level languages
Python, C++, Java
What is source code?
The code for a program written in a high level language. This needs to be translated into machine code
What is a low level language
A language that is closer to machine code than human language.
What is machine code?
The binary instructions that a processor can understand, follow, and then execute
Advantages of writing in low level languages
Gives more flexibility for programmers to do what they want
Disadvantages of writing in low level languages
- Hard to understand and write
- This makes it harder to spot errors and debug
What is assembly language
A low level language that uses mnemonics and is closely related to machine code
What is object code
Code that can be understood by a processor (basically machine code)
Why are translators needed
- They covert computer languages into machine code so the computer can understand it and run it
- They can identify any errors during translation
Different types of translators
Compiler, Interpreter
Advantages of compilers
- Translates the program in one go meaning the running of the program is subsequently faster
- Translates the program in one go meaning errors can be spotted without needing to run the program
- Produces an executable file that doesn’t need to be compiled again
- No need for the compiler to be present when the object code is run
Differences between high and low level programming languages
- High level are easy to understand whilst low level are hard to understand
- High level languages have to be translated before they can be run but low level languages often don’t need to be translated to be run