High and Low level languages Flashcards
Assembly lanuage
low-level language
closely reflects how opcodes and operands work
machine dependent
instructions use abbreviations called mnemonics
High level language
Written in a form that is close to human language
No knowledge of hardware/architecture required
machine independent
Low level language
Written in a form that is close to the processor instruction set
Knowledge of hardware/architecture is required
machine dependent
8 advantages of high level language
- easier to understand for programmers(closer to human language)
- portable
- no need to have understanding of computer architecture
- Much easier to debug and test
- Only need to learn a single language
- Has built in libraries and functions that can be reused(saves writing time)
- One instruction equals many processor instructions
- don’t need to manipulate memory addresses directly- no specialist knowledge
Translators
Assembler
Compiler
Interpreter
Assembler
- converts assembly language to machine code all at once
- produces an executable file
- produces an error report
- optimises source code to run efficiently
Machine code
binary instructions
executed by CPU
machine specific
doesn’t need to be translated
4 advantages of low level language
- Program often requires less memory/RAM
- Can make use of special hardware
- Can use memory addresses directly
- Can be written to run and execute faster (optimised speed of processing a program)
Interpreter
Translates high-level language into machine code
Translates (the source code) line by line/statement by statement
The interpreter is used each time the code is executed
Stops if it finds an error and will only continue when error is fixed
Compiler
Translates high-level language into machine code (object code)
Translates (the source code) all at once
Produces an executable file
Produces an error report / list of errors
Optimises the source code (to run efficiently)
interpreter advantages
faster for developing software and debugging
all of the code doesn’t need to be translated
easier to debug
compiler advantages
program can be executed without translator
faster execution(all at once)
provides an executable file so you cannot see the code