4.2 Types of Programming Languages, Translators & IDEs
High & Low Level Languages
High Level
Programming languages which allow users to program with easy to understand code
Python & Java are examples of this
Easier to read and write
To able to directly manipulate hardware
Less mistakes
Needs to be translated to machine code
Easier to debug
May be less efficient
Code is portable
Sample answer (Why code in a high-level language):
Easier to understand Easier to debug Easier to maintain Portable Can use an IDE Greater range of languages Knowledge of manipulating memory registers not required
Low Level
Languages that sit close to a computer's instruction set
Written for specific processors to ensure they embed the correct machine architecture
and are examples of this
Gives programmer complete control
Difficult to write & understand
Efficient code
Machine dependant
Direct manipulation of hardware
More errors
Direct communication to the hardware
Must know computer architecture
Assembly Language
This is written using mnemonics (such as , & ). It used rather than machine code and binary as it is easier. An assembler is needed to check the word to convert it into machine code.
Some use cases are:
Need to make use of specific hardware components
Complete specific machine dependant instructions
Ensure that only a small amount of RAM space is taken
Ensure that the code can be completed faster
Translators
Programmers will write code using high level languages. However, the machine needs the code to be translated into machine code (i.e. binary) for it to understand the commands.
There are two types of translators, interpreters & compilers.
Interpreter
Directly sends the source code to the machine code. It will translate each line of code individually. It will stop if there is an error and will only continue when the error is fixed.
Program will always run
Slower execution
Easier to debug
It has to be retranslated every time it's run
Do not store instructions (less RAM)
Cannot optimise code
Compiler
This will translate a program into machine code. It will translate it all in one go. This is mainly used when errors have been removed. It can take time to be processed. Error reports are produced after a program has been through the compiler.
Runs quickly
Takes up a lot of RAM
Optimises code
Will not identify where the errors are
Original source code cannot be viewed
Designed solely for one specific processor
Must be recompiled if the program is changed
Sample answer (Why use both an interpreter and a compiler):
Translate high-level language into a low-level language Interpreter used while writing the program Interpreter used to debug code line by line Compiler used when program completed Compiler used to create separate executable file
IDEs
An Integrated Development Environment is a piece of software that is used to write and test software.
Some features include:
Basic code formatting
Coloured keywords
Code editing
Comments
Identifiying errors
Debugger
Libraries
Translator
Exam Questions
Last updated