Programming languages Flashcards Preview

Paper 2 - Computer Science > Programming languages > Flashcards

Flashcards in Programming languages Deck (10)
Loading flashcards...
1

What is machine code?

-Machine Code is the set of binary instructions, the CPU uses to perform tasks.
-Machine Code is processor dependant.

2

What is assembly language?

A low level programming language which is processor-dependant; each instruction is one machine operation
- It uses mnemonics

3

What are the two types of high level programming languages?

Declarative and Imperative

4

What are Declarative high level languages?

Give some examples.

-They declare the necessary information to produce the required result.

SQL, CSS

5

What are Imperative high level languages?

- The program instructions are executed in an order defined by the programmer.

6

Advantages of using Machine Code and Assembly language over high level languages.

- Executes programs faster than high level
- Doesn't rely on the compiler to create optimised code
- Low level code is memory efficient due to the lack of abstraction.

7

Disadvantages of using Machine Code and assembly language over high level languages.

- Difficult to learn to program in a low level language
- High level languages have more training support for learning them.
- low level code is harder to debug
- High level code can be self documenting
- Machine code is processor dependant
- low level code is machine dependant

8

What are the 2 advantages of using assembly language over machine code

- It uses mnemonics
- The operand uses a decimal or hexadecimal number
Both of these things make assembly language easier to read/write for humans

9

Give examples of processes that need to use assembly language?

Embedded systems, interrupt handlers, device drivers

10

What is the relationship between machine code and assembly language?

They have a one to one relationship, one machine code instruction = one assembly language instruction