wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Compiler Design

Total questions: 15

Worksheet time: 7mins

Name
Class
Date
1.
Assembly language has mnemonics.
a)
True
b)
False
2.
Different CPUs require different assemblers.
a)
True
b)
False
3.
Compilers translate high-level language into machine code.
a)
True
b)
False
4.
High and low-level programming languages can be understood by a computer.
a)
False
b)
True
5.
An example of a high-level programming language is:
a)
Python
b)
Assembly
c)
Machine code
d)
Cloud
6.
Machine code uses the binary number system.
a)
True
b)
False
7.
High-level languages need to be compiled into machine code before they can be used by a computer.
a)
True
b)
False
8.
Machine code is easy to understand by a human.
a)
False
b)
True
9.

Which of the following is NOT a translator?

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Executable

10.

Translates low level assembly language mnemonic into machine code

a)

Assembler

b)

Compiler

c)

Interpreter

11.

This phase scans the source code as a stream of characters and converts it into meaningful lexemes.

a)

Lexical Analyzer

b)

Syntax Analyzer

c)

Semantic Analyzer

d)

Code Generator

12.

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

13.

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

14.

Which of the following is false:

a)

INTERPRETED programs run slower than COMPILED programs

b)

ASSEMBLY LANGUAGE is easier to read then MACHINE CODE

c)

COMPILED programs are easier to debug

d)

MACHINE CODE programs are usually HARDWARE SPECIFIC

15.

Which of these is not a stage in the compilation process:

a)

LEXICAL ANALYSIS

b)

CODE OPTIMISATION

c)

OBJECT CODE GENERATION

d)

SOURCE CODE GENERATION