2.5 Flashcards
1
Q
machine code
A
- binary representation of instructions in a format that the CPU can decode and execute
- have an operation code (op code) instruction and address or data to use
2
Q
what are low level languages
A
- written in assembly language
- translated by an assembler into machine code
3
Q
what are low level languages used for
A
- for embedded systems and device drivers where instructing the hardware directly is necessary
4
Q
high level languages
A
- e.g. languages such as python, c++, java, visual basic
- translated by a compiler or interpreter into machine code
5
Q
advantages of high level languages
A
- makes writing computer programs or interpreter into machine code
- one source code instruction translates into many machine code instructions
- code will run on different types of processors
- code is quicker and easier to understand and write
6
Q
disadvantages of high level languages
A
- less memory efficient
- code will be slower to execute if it is not optimised
7
Q
advantages of low level languages
A
- code is fast to execute
- memory efficient
8
Q
disadvantages of low level languages
A
- code is harder to write and understand
- the code works on one type of processor only
9
Q
advantages of interpreters
A
- easy to write source code because the program will always run
- code does not need to be recompiled when changed, making it beginner friendly
10
Q
disadvantages of interpreters
A
- translation software is needed at run time
- speed of execution is slower
- code is not optimised
- source code is needed
11
Q
advantages of compilers
A
- no need for translation software at runtime
- speed of execution is faster
- code is usually optimised
- original code is kept secret
12
Q
disadvantages of compilers
A
- the program will not run with syntax errors, making it more difficult to write the code
- code needs to be recompiled when the code is changed
- designed for a specific type of processor
13
Q
functions of IDEs
A
- debugging tools for finding logic errors
- help with preventing and identifying syntax errors
- providing a run time environment
14
Q
differences between compilers and interpreters
A
- compilers translate code in one go
- interpreters translate one line at a time
- compilers create an executable
- Compilers report all errors at the end
- interpreters stop when they finds an error
15
Q
what is the purpose of an assembler
A
to translate machine code into binary