Search Header Logo
2.5.1.Languages

2.5.1.Languages

Assessment

Presentation

Computers

10th - 11th Grade

Medium

Created by

Ian Currie

Used 1+ times

FREE Resource

19 Slides • 33 Questions

1

2.5.1.Languages

by Mr. Shingari

2

Walt

To be able to describe the different generations of programming language.

To be able to describe the differences between low-level and high-level languages.

To evaluate the benefits of programming in both low-level and high-level languages.

To state which translator is needed for each and why.

media

3

Open Ended

What would make code easier for a computer to understand?

What would make code easier for a programmer to write?

4

Open Ended

Question image

Find the error in this code:

The program should allow the user to input a value and then store it in memory address 25.

0001

1100

5

​Error in task

0001                            ‘This line is fine as it allows the user to enter a value into the Accumulator

1100                            ‘This line of code is not valid as it does not specify the memory address

media

6

Open Ended

Question image

Find the error in this code:

The following program allows the user to enter a value – the number 3 is added to the value and then output. Another value is then entered and the number 1 is added to the value – this is then also output.

0001

1010 000011

0010

0001

1010 00000001

0001 00000001

7

​​Task 2

0001                            ‘This is valid

1010 000011               ‘This is meant to add the value 3 – but the value is not an 8 bit Binary Number

0010                            ‘This correctly outputs the contents of the Accumulator

0001                            ‘This correctly allows input into the Accumulator

1010 00000001           ‘This correctly adds the value 1 to the contents of the Accumulator

0001 00000001           ‘This does not correctly output the contents of the Accumulator

media

8

Open Ended

Question image

Find the error in this code:

This program allows the user to enter 3 values – all the values are added together and output.

0001

1100 00010000

0001

0011 00010001

0001

1011 00010001

1010 00010000

0010

0001 00000001

9

​​Task 2

0001                            ‘Correct – allows input into the Accumulator

1100 00010000           ‘Correctly stores the value in location 16

0001                            ‘Correct – allows input into the Accumulator

0011 00010001           ‘Incorrect operation code

0001                            ‘Correct – allows input into the Accumulator

1011 00010001           ‘Adds memory location 17 to the Accumulator

1010 00010000           ‘Adds the value 16 to the Accumulator

0010                            ‘Outputs the result

 

media

10

​Generations of programming languages

​There are several generations of Programming Languages

Low-level

  • First generation

  • Second generation

High-level

  • Third generation

  • Fourth generation

11

First generation

Machine Code

Directly executable by the processor

The generation that ‘computers understand’

Difficult to program in, hard to understand, hard to find errors (hard to debug)

12

​Wilf

​You know the key features of Machine language.

13

Fill in the Blanks

Type answer...

14

Fill in the Blanks

Type answer...

15

Fill in the Blanks

Type answer...

16

​Second generation

​Assembly Code

Uses mnemonics

Easier to program but still difficult

One Assembly Language instruction translates to one Machine Code Instruction (1-1 relationship)

Needs to be translated into Machine Code for the computer to be able to execute it

It is most commonly used to program Device Drivers.

Device Drivers are loaded into memory by the Operating System and used to control the operation of a Hardware Device e.g. Graphics Card Drivers, Printer Drivers.

17

Fill in the Blanks

Type answer...

18

​Wilf

​You know the key features of Assembly language.

19

Fill in the Blanks

Type answer...

20

Fill in the Blanks

Type answer...

21

Fill in the Blanks

Type answer...

22

Fill in the Blanks

Type answer...

23

Fill in the Blanks

Type answer...

24

​Wilf

​You know the key features of High language and other languages.

25

Multiple Choice

Which language translator is needed for the first generation?

1

Compiler

2

Interpreter

3

No Translator

4

Language Translator

26

​Fourth generations

​Known as a Declarative Language

Facts and Rules are stated

Describes what computation should be performed and not how to perform it

Examples include:

SQL

Expert Systems

Artificial Intelligence

27

Multiple Choice

Identify the language this code belongs to?

Dim Num1, Num2, Tot as Integer

Num1 = Console.Readline()

Num2 = Console.Readline()

Tot = Num1 + Num2

Console.Writelein(“Total is: “ & Tot)

1

High-level (3rd Generation)

2

Low-level (2nd Generation)

3

Low-level

(1st Generation – Machine Code)

28

​Third Generation

​Easier to understand (programmer)

Easier to find errors, easier to de-bug

Uses English-Like Keywords

One instruction translates into many machine code instructions

e.g.’s Java, Basic, Pascal, C+

Translated using:

Compiler

Interpreter

29

Multiple Choice

Identify the language this code belongs to?

01010101010100101010100101010101010011111001000100001010100101

1

High-level (3rd Generation)

2

Low-level (2nd Generation)

3

Low-level

(1st Generation – Machine Code)

30

Multiple Choice

Identify the language this code belongs to?

LOAD r1, c

LOAD r2, d

ADD r1, r2

DIV r1, #2

1

High-level (3rd Generation)

2

Low-level (2nd Generation)

3

Low-level

(1st Generation – Machine Code)

31

Multiple Choice

Identify the language that has this feature. 

Directly executable by CPU

1

Assembly language

2

Machine code

3

High level langauge

32

Multiple Choice

Identify the language that has this feature. 

1-1 relationship between --------- Instruction and Machine Code

1

Assembly language

2

Machine code

3

High level langauge

33

Multiple Choice

Identify the language that has this feature. 

Easier for programmer to understand,

de-bug and write

1

Assembly language

2

Machine code

3

High level langauge

34

Multiple Choice

Identify the language that has this feature. 

1 to Many relationship in instructions with machine code.

1

Assembly language

2

Machine code

3

High level langauge

35

Multiple Choice

Identify the language that has this feature. 

- Hard to understand

- Hard to De-Bug

1

Assembly language

2

Machine code

3

High level langauge

36

​Walt

​To be able to describe the differences in operation between a Compiler and Interpreter

37

​Language translators

​Language Translators are used to translate a language into a form that the will be able to directly execute

Compilers/Interpreters are used for 3rd Generation

media

38

​Interpreters

Translate and execute source code.

Line by line, statement by statement.

Source code is checked for syntax – if correct, code is executed.

If incorrect interpreting is stopped.

Used for development (aid debugging).

39

​Compilers

Translate entire source code all in one go into Machine Code.

Optimise code.

Used at the end of development (ready for shipping).

Error Reports created along with Object Code.

40

Multiple Choice

Translation software needed at run-time

1

Language Translator

2

Compiler

3

Interpreter

41

Multiple Choice

Translation software needed at run-time

1

Language Translator

2

Compiler

3

Interpreter

42

Multiple Choice

Translates entire source code in one go

1

Language Translator

2

Compiler

3

Interpreter

43

Multiple Choice

Which translator converts from different languages?

1

Language Translator

2

Compiler

3

Interpreter

44

Multiple Choice

Which translator is used at the end of development?

1

Language Translator

2

Compiler

3

Interpreter

45

Multiple Choice

Which language translator is used during the development of a program?

1

Code Translation

2

Compiler

3

Interpreter

46

Multiple Choice

Which language translator is used during the development of a program?

1

Code Translation

2

Compiler

3

Interpreter

47

Multiple Choice

Which language translator produces Object Code and an Error Report?

1

Code Translation

2

Compiler

3

Interpreter

48

Multiple Choice

Which language translator does not convert source code into machine code?

1

Code Translation

2

Compiler

3

Interpreter

49

Multiple Choice

Which language translator does not convert source code into machine code?

1

Code Translation

2

Compiler

3

Interpreter

50

Multiple Choice

What is meant by source code?

1

The final executable program

2

The code written by the programmer

3

The additional information about errors

4

Code relating to sources of information on the Internet

51

​Walt

​To be able to describe the common tools and facilities in an Integrated Development Environment (IDE).

52

​Integrated Development Environment (IDE):

​Editor (for writing the code)

Error Diagnostics (such as de-bug facilities)

Run-Time Environment

Translators

2.5.1.Languages

by Mr. Shingari

Show answer

Auto Play

Slide 1 / 52

SLIDE