wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

1.2.2 Application Generation

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What is machine code?

a)

Instructions and data in binary

b)

Serial number of the CPU

c)

Instructions and data in human readable form

d)

Instructions and data in assembly code mnemonics

2.

What is the problem writing machine code?

a)

Quick to learn

b)

Easy to debug

c)

Easy to read

d)

Hard to remember the binary codes Hard to remember the binary codes

3.

What is a MNEMONIC?

a)

A single action that can be performed by a computer.

b)

A symbol that represents an instruction in assembly code.

c)

A high level language keyword.

d)

A register used inside a CPU A register used inside a CPU.

4.

Which of the following is NOT a High Level Language?

a)

Python

b)

Java

c)

x86 Assembly

d)

C++

5.

Why were high-level languages developed?

a)

Low-level language was too easy

b)

They were created by accident

c)

Low-level languages are hard to remember and use

d)

Computers were getting too advanced

6.

What does a translator do?

a)

Swaps between different high-level languages

b)

Swaps between different machine code types

c)

Converts pseudocode to machine code

d)

Converts programs to machine code

7.

Which of the following is NOT a translator?

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Executable

8.

Why do we need translators?

a)

Computers only understand program's in assembly code.

b)

Computers only understand program's in high-level language.

c)

Computers only understand Norwegian.

d)

Computers only understand program's in machine language.

9.

It translates the whole program into machine code before it runs.

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Linker

10.

It translates code into machine code instruction by instruction.

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Linker

11.

It translates assembly code into machine code.

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Linker

12.

In general, compiled code is quicker than interpreted code.

a)

True

b)

False

13.

In general, compiled code is smaller than interpreted code.

a)

True

b)

False

14.

In general, compiled code is easier to debug than interpreted code.

a)

True

b)

False

15.

You do not get access to the source code with compiled code.

a)

True

b)

False

16.

Which of the following is not a stage of Compilation?

a)

Lexical Analysis

b)

Syntax Analysis

c)

Run-time Analysis

d)

Code Generation

e)

Code Optimisation

17.

Stage of compilation that replaces keywords and variables with tokens.

a)

Lexical Analysis

b)

Syntax Analysis

c)

Semantic Analysis

d)

Code Generation

e)

Code Optimisation

18.

Stage of compilation that checks that the rules of the language are being followed.

a)

Lexical Analysis

b)

Syntax Analysis

c)

Semantic Analysis

d)

Code Generation

e)

Code Optimisation

19.

Stage of compilation that checks a sequence of tokens is valid.

a)

Lexical Analysis

b)

Syntax Analysis

c)

Semantic Analysis

d)

Code Generation

e)

Code Optimisation

20.

Stage of compilation that removes redundant code and replaces inefficient code.

a)

Lexical Analysis

b)

Syntax Analysis

c)

Semantic Analysis

d)

Code Generation

e)

Code Optimisation