Search Header Logo
untitled

untitled

Assessment

Presentation

Computers

Practice Problem

Hard

Created by

Georgios Kakavelakis

Used 1+ times

FREE Resource

11 Slides • 58 Questions

1

Multiple Choice

High level languages are easy to understand...

1

True

2

False

2

Multiple Select

Low level programming languages are... [2 answers]

1

Easy to read, understand and modify

2

Difficult to read, understand and modify

3

Very simple to understand

4

More memory efficient than high-level languages

3

Multiple Choice

High level languages...

1

Can be run directly from the code

2

Need to be translated before execution

3

Are targeted at a specific CPU

4

Multiple Choice

Translates all of the source code into machine code in one go

1

Assembler

2

Compiler

3

Interpreter

5

Multiple Select

Compilers... [2 answers]

1

Create a single executable file

2

Take a long time to translate

3

Are useful for debugging

4

Only translate assembly code

6

Multiple Select

Which of the following are true? [3 answers]

1

Assemblers translate assembly code

2

Compilers run one line at a time

3

Interpreters are needed every time the program is run

4

Compilers run more quickly than interpreters

7

Multiple Select

Which of the following are true?

1

High level languages are written for a specific processor

2

High level languages abstract how the data is stored from the programmer

3

Low level languages are easy to read and modify

4

Low level languages are written for a specific architecture

8

Multiple Choice

Assemblers...

1

Use lots of memory

2

Each instruction matches one unique machine code instruction

3

Are unsuitable for embedded systems

9

Multiple Choice

Which of these is high level code?

1
2

10

Multiple Choice

Which of these is low level code?

1
2
3

Neither

11

Multiple Select

Which of these is high level code? [2 answers]

1
2
3
4

None of them

12

Multiple Choice

Question image

This is an example of what type of language?

1

High level

2

Low level

3

Both

4

Neither

13

Dropdown

Any program written in a ​
language (such as Python or Java) is known as ​
. However, computers cannot understand this. Before it can be run, ​
must first be translated into a form which a computer understands - this form is called object code.





A ​
is a program that converts source code into object code. Generally, there are three types:

* ​
* interpreters

* assemblers

14

Drag and Drop

programming languages are user-friendly, abstracting complex hardware details to boost developer productivity and software portability. However, their abstraction leads to slower execution and less hardware control.



languages, in contrast, provide fast performance and ​
, ideal for ​
. Yet, they demand more expertise, carry a higher risk of ​
, and are less portable, requiring a thorough understanding of the underlying system architecture.
Drag these tiles and drop them in the correct blank above
High-level
Low-level
deep hardware control
system-critical applications
bugs

15

Categorize

Options (16)
  1. Translates all source code to object code at once.

  1. Produced programs run quickly.

  1. Generates executable files.

  1. Optimises code for speed and memory.

  1. Requires significant memory for compilation.

  1. Errors detected after compilation.

  1. Code must be recompiled for changes.

  1. Compiled code is platform-specific.

  1. Translates code one instruction at a time.

  1. Executes instructions immediately.

  1. Quick error detection during execution.

  1. Runs slower due to on-the-fly translation.

  1. Needs translation every run.

  1. Doesn't produce executable files.

  1. Source code must be distributed.

  1. Does not optimise code.

Organise these options into the right categories

Compilers
Interpreters

16

Labelling

Label the following diagram correctly

Drag labels to their correct position on the image

Computer's own language

Interpreter

Easy for programmer to understand

High level language

Binary numbers (All 1s and 0s)

Machine code

17

Multiple Choice

What generation of programming language is Machine Code

1

1st Generation

2

2nd Generation

3

4th Generation

4

3rd Generation

18

Multiple Choice

What type of language translator is needed for the 1st Generation to the CPU

1

Compiler

2

No translator needed

3

Assembler

4

Interpreter

19

Multiple Choice

2nd generation to 1st Generation language needs what type of translator.

1

An assembler

2

Interpreter

3

No translator needed

4

Compiler

20

Multiple Select

What language translators can be used to translate 3rd to 2nd generation.

1

Compiler

2

No translator needed

3

Assembler

4

Interpreter

21

Multiple Choice

Which generation is the fastest code to execute.

1

3rd Generation

2

2nd Generation

3

4th Generation

4

1st Generation

22

Multiple Choice

What is the easiest to program for a programmer.

1

1st Generation

2

2nd Generation

3

4th Generation

4

3rd Generation

23

Multiple Choice

What is used to translate the entire source code in one go.

1

Assembler

2

Compiler

3

Interpreter

4

Router

24

Multiple Choice

Which translator stops when it encounters an error.

1

Assembler

2

Interpreter

3

Compiler

4

Editor

25

Multiple Choice

On fully developed code, what translator is used at the end before publishing.

1

Assembler

2

Compiler

3

Interpreter

4

Editor

26

Multiple Choice

Low level languages use what type of code.

1

Hexadecimal

2

Binary

3

Logic

4

Cryptic

27

Multiple Choice

Object code and error reporting are produced in what type of language translator.

1

Assembler

2

Compiler

3

Interpreter

4

Editor

28

Translators

N5 Computing Science

media

29

High Level Languages

  • Programs written in a language similar to English

    Python, Java, C#, HTML, SQL

  • Advantages

  • The commands use English keywords such as PRINT, INPUT, WHILE etc. which are easy to understand

  • Complex arithmetic can be performed in one instruction that would take many machine code instructions

  • They have in-built mathematical and logical functions to process the data

30

But what do Computers Understand

????????

31

Computer Understand Machine Code

  • Machine code is the computer’s own programming language, made up of binary codes to represent the program or instructions.

32

We need to translate for Computers

From High Level Language to Binary Machine Code

33

This is done by Translators

  • There are 2 types of Translator

  • Compiler

  • Interpreter

34

Compilers

  • A compiler translates the complete program (source code) into object code (machine code) in one go before the program is run.

  • Compiled programs run faster since there is no translation at run time.

  • It produces stand-alone machine code program which runs by itself without the need for the source code and the compiler

35

Interpreter

  • An interpreter translates and executes source code programs one statement at a time into machine code while the program is run

  • It will run more slowly than a compiled program due to executing the program one line at a time.

  • Execution will stop immediately if the interpreter translates a line of source code that results in an error making it easier to spot errors in the code

36

Let's see if you've understood

????????

37

Multiple Choice

Which of these could be machine code?

1

print ("01011011")

2

01011011

3

code = int(input("Enter code")

38

Multiple Choice

Which of these is an example of a high level language?

1

Binary Machine Code

2

Python

3

CSS

39

The next few questions will have an answer of either Compiler or Interpreter

Let's play which translator!!

40

Multiple Choice

This translator program reports errors at the end of translation.

1

Compiler

2

Interpreter

41

Multiple Choice

This translator needs to be present in memory each time the program is executed.

1

Compiler

2

Interpreter

42

Multiple Choice

This translator runs more slowly due to executing the program one line at a time.

1

Compiler

2

Interpreter

43

Multiple Choice

Using this translator means that the source code program will only be used again if the program needs to be changed.

1

Compiler

2

Interpreter

44

Multiple Choice

This translator will stop program execution immediately if it finds a line of source code that results in an error

1

Compiler

2

Interpreter

45

Multiple Choice

Last one!!!


A program which has been translated using this type of translator will run faster

1

Compiler

2

Interpreter

46

Summary of Translators

  • Use an interpreter when debugging code


  • Once code is error free, use a compiler.

47

Multiple Choice

Represented by 0s and 1s. This is the only language that a computer can execute.

1

Machine code

2

Assembly code

3

Source code

48

Multiple Choice

Written in formal, structured English; this type of programming language is easier for humans to read, maintain, and debug.

1

High-level code

2

Low-level code

3

Machine code

49

Multiple Choice

int a=b+c


is an example of

1

Machine code

2

Assembly code

3

High-level language

50

Multiple Choice

mov edx, DWORD PTR[rbp-0x4]


is an example of

1

Machine code

2

Assembly code

3

High-level language

51

Multiple Choice

0011001100100


is an example of

1

Machine code

2

Assembly code

3

High-level language

52

Multiple Choice

If a program written in assembly language uses 400 lines of code, how many lines of machine code will there be?

1

200

2

400

3

800

53

Multiple Choice

What is needed in order to translate assembly language to machine code?

1

Interpreter

2

Compiler

3

Assembler

54

Fill in the Blanks

Type answer...

55

Multiple Select

Which are three reasons why high-level languages are more suitable for programmers than low-level languages?

1

Easier to read/write

2

Easier to translate

3

Easier to maintain

4

Easier to debug

56

Multiple Select

Why are translators necessary?


check all that apply

1

Translators convert high-level languages into machine code

2

Computers can only understand machine code

3

so that programmers could write using high-level languages

57

Multiple Choice

Which creates an executable file that can then be used independently of the original source code.

1

Compiler

2

Interpreter

58

Multiple Choice

Which translates and executes each line of code during runtime

1

Compiler

2

Interpreter

59

Multiple Select

Choose all the advantages of a compiler over an intepreter ...

1

Program executes faster

2

Can keep source code secret

3

More portable as can produce intermediate bytecode

4

Debugging tends to be easier

60

Multiple Select

Choose all the advantages of an interpreter over an compiler...

1

Detects errors as they arise at run-time

2

Easier to keep source code secret

3

More portable as can produce intermediate bytecode

4

Debugging tends to be easier

61

Multiple Choice

What is the main criteria a programmer should use when choosing a programming language to use?

1

Nature of the task

2

Availablity of a compiler

3

Whether language is compiled or interpreted

4

Popularity of programming language

62

Multiple Choice

A list of instructions that enable a computer to perform a specific task is a...

1

Computer Program

2

Algorithm

3

Machine Code

4

Binary Code

63

Multiple Choice

When writing a computer program most program use...

1

A High Level Language

2

A Machine Code

3

An Algorithm

4

A Low Level Language

64

Multiple Choice

A language that requires no knowledge of the hardware or the instruction set of the computer is called...

1

Machine Code

2

A Low Level Language

3

An Algorithm

4

A High Level Language

65

Multiple Choice

Resolving errors in a program is known as...

1

Problem Solving

2

Error Checking

3

Debugging

4

Refixing

66

Multiple Choice

The two categories of low level language are...

1

Machine Code & Assembly

2

Machine Code & Algorithms

3

Assembly & Algorithms

4

Algorithms & Binary

67

Multiple Choice

To write a program for a specific device such as an air conditioning unit, which type of language would be used?

1

High Level

2

Java

3

Low Level

4

Binary

68

Multiple Choice

Which of the following is not an advantage of using a low level language?

1

To perform a task very quickly

2

Makes more efficient use of primary memory

3

To enable the program to be run on multiple platforms

4

Tailor a program to a specific piece of hardware

69

Multiple Select

The 3 main types of translators are...

1

Assemblers, Compilers & Interpreters

2

Assemblers, Scripters & Interpreters

3

Assemblers, Compilers & Converters

4

Converters, Scripters & Interpreters

High level languages are easy to understand...

1

True

2

False

Show answer

Auto Play

Slide 1 / 69

MULTIPLE CHOICE