Programing languages Flashcards

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

Define a High Level coding language

A

A computer programming language that resembles natural language or mathematical notation and is designed to reflect the requirements of a problem

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

What are the advantages of Highlevel languages

A
  • Easier to learn
  • Easier to debug
  • Easier to write
  • Others can understand
  • Less complex
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why are High level languages easier to learn

A

They are closer to the natural language that we use.

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

High level languages are:

A
  • Python
  • Java
  • C++
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define source code

A

A set of instructions that are written in human readable programming language

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

Define low level languages

A

A programming language that provides little or no abstraction from a computer’s instruction set architecture

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

Examples of low level languages are……..

A
  • Machine code
  • Assembly language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is machine code

A

Aset of instructions that a CPU
understands directly and can act upon. (Binary code)

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

What are the disadvantages of using a low level language

A
  • Difficult to debug
  • Difficult to understand
  • Very long(only 1 and 0)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Assembly code

A

A coding language that is a midpoint between high and low level languages

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

What does Assembly code use

A

It uses mnemonics- short abbreviations. Each mnemonic directly corresponds with a machine code instruction

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

What are the advantages of Assembly code

A
  • Easier to read and debug than machine code
  • Shorter than machine code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the disadvantages of Assembly code

A
  • Still a complex language to understand
  • Syntax is difficult to rember
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is opcode

A

The actual instruction in low level languages

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

What is operand

A

The data that the CPU uses in the instruction in low level languages

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

What is scource code

A

Code writen in a high level language. It cannot be understood by a computer

17
Q

What is a translator

A

A program that converts source code into machine code.

18
Q

What are the 3 types of translator

A
  • compilers
  • interpreters
  • assemblers
19
Q

How do compliers translate
source code

A

Takes the source code as a whole and translates it into machine code all in one go

20
Q

What are the advantages of compliers

A
  • Run code quickly (already translated)
  • They optimise code
21
Q

What are the disadvantages of compliers

A
  • The whole code must be retranslated if changes are made
  • It cannot be run on other platforms (translated specific to the processor)
22
Q

How do interpreters translate source code

A

They translate each instruction separately and the instruction is executed imediately

23
Q

Advantages of interpreters

A
  • They execute as soon as they are translated (quick)
  • Errors can quickly be spotted
24
Q

Disadvantages of interpreters

A
  • Run slowly (one instruction at a time only)
  • Has to be translated everytime its run
  • Do not optimise code
25
Q

How do assembler translators work

A

They translate one assembly code instruction into one machine code instruction