Unit:4 Software: CODING Flashcards

(25 cards)

1
Q

What is a low level language?

A

A low-level language is a programming language that directly translates to machine code understood by the processor

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

What is a first-generation language

A

Machine code

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

Second generation

A

Assembly code is a second-generation language

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

How is assembly code written?

A

The code is written using mnemonics, abbreviated text commands such as LDA (Load), STA(Store)

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

How is assembly code translated to machine code?

A

Using an assembler

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

Advantages of low-level languages?

A

Complete control over the system components

Occupy less memory and execute faster

Direct manipulation of hardware

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

Disadvantages of low level languages

A

Difficult to write and understand
Machine dependent
Prone to errors
Knowledge of computer architecture is key to program effectively

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

Why are low-level languages fast?

A

They allow direct control over hardware which leads to greater efficiency.

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

What is a high level language?

A

A high-level programming language uses English-like statements to allow users to program with easy to use code

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

Advantages of high level languages

A

Easier to read and write

Easier to debug

Portable so can be used on any computer

One line of code can perform multiple commands

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

Disadvantages of high level languages

A

The user is not able to directly manipulate the hardware

Needs to be translated to machine code before running

The program may be less efficient

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

What is a translator?

A

A translator is a program that translates program source code into machine code so that it can executed directly by a processor

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

How are high level languages translated to machine code

A

translated using a compiler or interpreter

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

What is a compiler?

A

A compiler translates high-level languages into machine code all in one go

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

Advantages of compiler

A

-Speed of execution
-Optimises the code
- Original source code will not be seen

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

Disadvantages of compiler

A

Can be memory intensive

Difficult to debug

Changes mean it must be recompiled

It is designed solely for one specific processor

17
Q

What is an interpreter?

A

An interpreter translates high-level languages into machine code one line at a time

18
Q

Advantages of interpreter

A

Stops when it finds a specific syntax error in the code

Easier to debug

Require less RAM to process the code

19
Q

Disadvantages of interpreter

A

Slower execution

Every time the program is run it has to be translated

Executed as is, no optimisation

20
Q

What is an IDE?

A

An Integrated Development Environment (IDE) is software designed to make writing high-level languages more efficient

21
Q

Features of an IDE

A

Editor

Error diagnostics

Run-time environment

Built in Translators

22
Q

What does the editor do?

A

An editor gives users an environment to write, edit and maintain high-level code

23
Q

Features of editor

A

Basic code formatting tools - changing the font, size of the font and making text bold etc

Prettyprint - using colour to make it easier to identify keywords, for example ‘print’, ‘input’ and ‘if’ in Python

Code editing - auto-completion and auto-correction of code, bracket matching and syntax checks

Commenting code - allows sections of code to be commented out easily to stop it from being run or as comments on what the program is doing

24
Q

What are error diagnostics

A

Tools that help to identify, understand and fix errors in code, such as:

Identifying errors - highlight particular areas of code or provide direct error messages where the error may have appeared e.g. indentation errors etc

Debugger - provide a ‘step through’ command which provides step by step instructions and shows what is happening to the code line by line, useful for finding logic errors

25
What does a Run time environment do
Gives users the ability to run and see the corresponding output of a high-level language