Programming languages and IDEs (Paper 2) Flashcards

(29 cards)

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

how did the invention of high-level languages come about

A

-early computers were complex and instructions would have to be written in binary code
-this process was slow, taking days to program simple tasks
-over time, new generations of programming languages have enabled people to become faster and more efficient at writing programs as they resemble human language

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

what is a low level language

A

-a programming language that directly translates to machine code understood by the processor
-they allow direct control over hardware components such as memory and registers
-these languages are written for specific processors to ensure they embed the correct machine architecture

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

what generations are low level languages

A

first gen
second gen

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

what are first generation languages

A

machine code is a first generation language
instructions are directly executable by the processor
written in binary code

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

what are second generation languages

A

assembly-code is a second generation language
code is written using mnemonics, abbreviated text commands
using this language programmers can write human-readable programs that correspond almost exactly to machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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
8
Q

disadvantages of low-level languages

A

-difficult to write and understand
-machine dependant
-more prone to errors
-knowledge of computer architecture is key to program efficiently

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

what is a high level programming language

A

-uses English-like statements to allow users to program with easy to use code
-high-level languages allow for clear debugging and once programs are created they are easier to maintain
-high level languages were needed due to the development of processor speeds and the increase in memory capacity

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

in a high level programming language, what does one instruction translate to

A

many machine code instructions

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

examples of high level languages

A

python
java
basic
C+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
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
13
Q

disadvantages of high level languages

A

user is not able to directly manipulate the hardware
needs to be translated to machine code before running
program may be less efficient

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

what is a translator

A

a program that translates program source code into machine code so it can be executed by a processor

low level languages such as assembly code are translated using an assembler
high level languages such as python are translated using a compiler or interpreter

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

what is a compiler

A

-translates high-level languages into machine code all in one go
-generally used when a program is finished and has been checked for syntax errors
-can be distributed without the need for translation software

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

advantages of compilers

A

speed of execution
optimises the code
original source code will not be seen

17
Q

disadvantages of compliers

A

can be memory intensive
difficult to debug
changes mean it must be recompiled
designed solely for one specific processor

18
Q

what is an interpreter

A

-translates high level languages into machine code one line at a time
-each line is executed after translation and if any errors are found, the process stops
-interpreters are generally used when a program is being written in the development stage
-interpreted code is more difficult to distribute as translation software is needed for it to run

19
Q

advantages of an interpreter

A

-stops when it finds a specific syntax error in the code
-easier to debug
-requires less RAM to process the code

20
Q

disadvantages of an interpreter

A

-slower execution
-every time the program is run it has to be translated
-executed as is, no optimisation

21
Q

what is an IDE

A

a software designed to make writing high-level languages more efficient

22
Q

how do IDE’s make the process of creating/maintaining code easier

A

editor
error diagnostics
run-time environment
translators

23
Q

what is an editor

A

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

24
Q

what can editors provide

A

-basic code formatting tools (changing the font, size of the font et)
-coloured keywords (uses colour to make it easier to identify key words)
-code editing (auto-completion and auto-correction of code)

25
what are error diagnostics
-tools that help to identify, understand, and fix errors in code
26
what can error diagnostics provide
identifying errors (highlight particular areas of code or provide direct error messages) debugger (provides a 'step through command which provides step by step instructions and shows what is happening to the code line by line)
27
what is a run-time environment
gives users the ability to run and see the corresponding output of a high-level language
28
do IDEs have translators
yes, they are built in to comply or interpret code
29
what is casting in programming
when you convert one data type into another e.g. string to integer