Languages and translators Flashcards
(18 cards)
What are low level languages
Programming languages which have simple commands, and more understandable to computers by using mnemonics
An example is assembly language
They are used to directely manipulate hardware.
Advantages of low level languages
Executed quickly and are more memory efficient.
Does not need to be compiled or interpreted
Disadvantages of low level languages
Hard to read, harder to understand and debug
Translator used for low level languages
Assembler
What does an assembler convert?
Assembly language to machine code
How does an assembler convert?
Turns basic commands into binary code which is recognized by a specific processor
What are high level languages
Programming languages which are more similar to english, and are designed to be more understandable to humans
They can run on any system
Example includes Python
Advantages of high level languages
Easier for humans to write, understand, debug, read
Also easier to maintain programs written with high level languages
Disadvantages of high level languages
Takes longer to execute
Cannot use special hardware
Programs are longer
Translator used for high level languages
Compiliers or interpreters
What does a compilier convert?
High level to machine code
What does an interpreter convert?
High level to machine code
How does a compilier convert?
Produces an executable file in one go
An error report is provided for the whole code after compilation
Advantages of using a compilier
Faster
Only needs to be complied once (exe file)
Disadvantages of using a compilier
Harder to check for mistakes (cuz they shown at the end)
Need to recompile if changed
How does an interpreter convert?
Each line is translated before execution
Stops as soon as an error is found
Advantages of using an interpreter
Useful for spotting errors
Better for development
Disadvantages of using an interpreter
It is slower
The program needs to be interpreted every time before use