Worksheets1.2.2 Application Generation
Total questions: 20
Worksheet time: 10mins
What is machine code?
Instructions and data in binary
Serial number of the CPU
Instructions and data in human readable form
Instructions and data in assembly code mnemonics
What is the problem writing machine code?
Quick to learn
Easy to debug
Easy to read
Hard to remember the binary codes Hard to remember the binary codes
What is a MNEMONIC?
A single action that can be performed by a computer.
A symbol that represents an instruction in assembly code.
A high level language keyword.
A register used inside a CPU A register used inside a CPU.
Which of the following is NOT a High Level Language?
Python
Java
x86 Assembly
C++
Why were high-level languages developed?
Low-level language was too easy
They were created by accident
Low-level languages are hard to remember and use
Computers were getting too advanced
What does a translator do?
Swaps between different high-level languages
Swaps between different machine code types
Converts pseudocode to machine code
Converts programs to machine code
Which of the following is NOT a translator?
Assembler
Compiler
Interpreter
Executable
Why do we need translators?
Computers only understand program's in assembly code.
Computers only understand program's in high-level language.
Computers only understand Norwegian.
Computers only understand program's in machine language.
It translates the whole program into machine code before it runs.
Assembler
Compiler
Interpreter
Linker
It translates code into machine code instruction by instruction.
Assembler
Compiler
Interpreter
Linker
It translates assembly code into machine code.
Assembler
Compiler
Interpreter
Linker
In general, compiled code is quicker than interpreted code.
True
False
In general, compiled code is smaller than interpreted code.
True
False
In general, compiled code is easier to debug than interpreted code.
True
False
You do not get access to the source code with compiled code.
True
False
Which of the following is not a stage of Compilation?
Lexical Analysis
Syntax Analysis
Run-time Analysis
Code Generation
Code Optimisation
Stage of compilation that replaces keywords and variables with tokens.
Lexical Analysis
Syntax Analysis
Semantic Analysis
Code Generation
Code Optimisation
Stage of compilation that checks that the rules of the language are being followed.
Lexical Analysis
Syntax Analysis
Semantic Analysis
Code Generation
Code Optimisation
Stage of compilation that checks a sequence of tokens is valid.
Lexical Analysis
Syntax Analysis
Semantic Analysis
Code Generation
Code Optimisation
Stage of compilation that removes redundant code and replaces inefficient code.
Lexical Analysis
Syntax Analysis
Semantic Analysis
Code Generation
Code Optimisation
