1) What is machine code?
2) What are Opcodes and Operands?
1)
-Processors only understand machine code
-Machine code is binary sequences that represent instructions and data
-Originally no choice but to code in machine code
2)
-Opcodes are the sequences contain instructions
-Operands are the sequences containing data
What is an instruction set?
1) What is assembly language?
2) What is an assembler?
1)
-Written in mnemonics making code easier to read and write
-Not very portable (different chips will have different languages)
2)
-Assembler converts assembly into object code
Why were HLL’s introduced?
What is an interpreter? +/-
*Reads code line by line
*Each line is converted into machine code
*Then Machine code is executed
+Useful when debugging as the execution will terminate at the line where the error occurs
-Runs slower
-May involve the translation of the same code multiple times
-User needs to have access to an interpreter to execute the code which takes up more memory
What is a compiler?
What is object code?
What are utilities? Examples?
What are applications? Examples?
How to compilers work? (In general terms)
-go through a defined sequence of steps
Each step brings the high level code closer to machine code
What is lexical analysis?
What is a symbol table used for?
What is syntax?
-set of rules that govern its structure
What is syntax analysis?
What is the code generation step of compilation?
- complainer now takes this and converts into object code
What is the optimisation step of compilation?
What are libraries?
What are linkers/loaders?
What is static linking?
What is dynamic linking?