High And Low Level Languages Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Describe high level languages

A

One instruction of high level represents many instructions of machine code.
The same code will work for many different machines and processors.
The programmer can easily store data in lots of different structures without knowing about the memory structure.
Code is easy to read, understand and modify.
Must be translated into machine code before a computer is able to understand it.
You don’t have much control over what the CPU actually does so programs will be less memory efficient and slower.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe Low level languages

A

One instruction os assembly code usually only represents one instruction of machine code.
Usually written for one type of machine or processor and won’t work on any others.
The programmer needs to know about the internal structure of the CPU and how it manages the memory.
Code is very difficult to read, understand and modify.
Commands in machine code can be executed directly without the need for a translator.
You control exactly what the CPU does and how it uses memory so programs will be more memory efficient and faster

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a logical error

A

An error that arises from an incorrect algorithm design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is systematic error

A

An error that arises from incorrect spelling or grammar in the code not consistent with the program language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a truncation error?

A

Error that arises from executing a finite number of steps to approximate an infinite process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a rounding error

A

Error that occurs due to exact numbers being approximated to a lower number of significant figures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a linking error

A

Error that arises due to connection problems with other code or databases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a run time error

A

Error that arises due to an unexpected event happening when the code is executed , e.g the program running out of memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is function

A

A subroutine that returns a value to the main program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a scope

A

The range in which a variable can be accessed in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a global variable

A

A variable declared outside any subroutines and accessible throughout the program including the subroutines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a local variable

A

A variable declared within a subroutine which can only be accessed in that subroutine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a procedure

A

A subroutine that does not return a value back to the main program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a parameter

A

Placeholders for values that a procedure or function expects to pass when it is called.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is lexical analysis

A

First stage of compilation
Comments and unneeded spaces are removed
Keywords, constants and identifiers are replaced by ‘tokens’
A symbol table is created which holds the addresses of variables and subroutines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is syntax analysis

A

Second stage of compilation
Tokens are checked to see if they match the spelling and grammar expected, using standard language definitions.
If syntax errors are found, error messages are produced.

17
Q

What is semantic analysis

A

Variables are checked to ensure that they have been properly declared and used.
Variables are checked to ensure that they are of the correct data types.
Operations are checked to ensure that they are legal for the type of variable being used .

19
Q

What is code generation

A

Machine code is generated

Code optimisation may be employed to make it more efficient