Paper 2 Flashcards

1
Q

Each line of assembly code is equal to …… lines of machine code

A

One

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

Assembly language created to

A

Speed things up

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

Assembly language made

A

Opcodes easier to read because used a mnemonic and operand to form an instruction

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

Assemblers

What do they do

A

Translate assembly language to machine code

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

Assembly language

Negative

A

Time consuming

Hard to read debug and maintain

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

Grace Hopper

Idea

A

Her idea

Creating compiler to translate English code to machine code

Took 3 years to be taken seriously

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

What did people think computers could do

Who changed that

A

Computers could only do arithmetic

Grace Hopper

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

High level languages examples

A

Fortran

COBOL

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

High level languages

Properties

A

Easier to read

Easier to Maintain and debug code

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

High level languages can be translated using

A

Compiler or interpreter

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

Compiler

What will it do

A

Create a single executable file that can be run without original source code

(Translates high level languages)

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

Interpreter

What will it do

A

Translate high level languages

Run the source code one line at a time and doesn’t create executable file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
Compiler
Can do (document)
A

Create fully translated version of a document and use whenever need to

Takes time
Not need original document anymore
Easily share translated document

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

Interpreter
Can do
(Document)

A

Translate each line of document individually whilst you use it

Quick to do initially
Always need interpreter when wanting to use document

To share, others would need interpreter

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

High level language definition

A

Written in formal structured English

Easier for humans to read, maintain and debug

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

Low level language definition

A

Written in machine code or assembly language, quickly executed by a computer

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

Interpreter definition

A

Translates and executes a program one line at a time

Always required for code to execute

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

Compiler definition

A

Translates program into executable file that will work independently from the source code

19
Q

Translator

A

Executes the programs that programmers write in high level language

20
Q

Machine code definition

A

Represented by 0 and 1s

Only language a computer can execute

21
Q

Example of
Machine code
Assembly language
High level language

A

0011001100100

mov edx, DWORD PTR [rbp-0x4]

Int c=a+b

22
Q

If a program written in assembly language uses 400 lines of code, how many lines of machine code would there be

A

400 lines of code

23
Q

What is needed in order to translate assembly language to machine code

A

Assemblers

24
Q

Machine code is specific to ….

A

CPU

25
Q

Who first conceived the idea of a compiler

A

Grace Hopper

26
Q

Advantages of subroutines

A

Easier to spot errors and fix because dealing with smaller problems

Easier to reuse code

Used with other apps

Allows to decompose the problem in structured format

Large programming problem can be divided between programmers

27
Q

Purpose of trace tables

A

Run through an algorithm and simulate what a computer would do if the program were to execute

Test the logic of an algorithm - errors can be spotted

28
Q

To categories of subroutines

A

Procedures

Functions

29
Q

Procedure definition

A

Executes a specific set of commands when it is called

Never returns a value

30
Q

Function definition

A

Used to calculate or process a value based on arguments given

Always returns a value

31
Q

Return value definition

A

A value that is returned by a function

32
Q

Parameter definition

A

Used in a subroutine to allow values to be passed into them

33
Q

Argument definition

A

The values held in the brackets of a subroutine call

Passed into a subroutine via the parameters

34
Q

Subroutine definition

A

A sequence of instructions to perform a specific task with an identifiable name

35
Q

Def meaning in programming

A

Defines the subroutine

36
Q

Variable definition

A

Holds a value in a memory location that is needed for the execution of your program

Can hold one value at a time

37
Q

Initialising definition

A

Initial value is assigned to the variable

38
Q

Declaration definition

A

Declare a variable as a certain data type

39
Q

Assignment meaning

A

Change the value held at the variable location

40
Q

IDE stand for

A

Integrated development environments

41
Q

IDE

Created for

A

Give programmers all the tools they needed to write programs in one place

42
Q

IDE

Allow programmer to

A

Write run and debug code without switching programs

43
Q

IDE

Includes

A
Colour coding 
Highlight important syntax structures
Automatically indent code
Autocomplete lines
Point out any errors
44
Q

IDE will call…

A

Interpreter to translate the code and allow program to be run and tested