F453 State Flashcards

1
Q

State three of the tasks performed by an assembler when producing machine code.

A

Reserves storage for instructions and data.
Replaces mnemonic op codes by machine codes.
Replaces symbolic addresses by numeric addresses.
Creates a symbol table to match labels to addresses.
Checks syntax/offers diagnostic for errors.

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

State two features of a compiler.

A

Translates the whole program as a unit.
Creates an executable program/intermediate program.
Report a number of errors at the same time.
Optimisation.

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

State the three stages, in order, of the machine cycle in classic Von Neumann Architecture.

A

Fetch-Decode-Execute.

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

State the type of traversal that should be used to obtain the reverse Polish form from a binary tree.

A

Post Order Traversal (POT).

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

State what data structure, other than a binary tree, may be associated with reverse Polish notation.

A

Stack.

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

State a symbol, often associated in mathematical expressions, that is not required when working with reverse Polish notation.

A

Parenthesis.

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

State the meaning of the term symbolic addressing.

A

The use of characters that represent the address of a store location.

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

State the meaning of direct addressing.

A

The instruction gives the address to be used.

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

State two sources of interrupts and explain why these interrupts have different priorities.

A

Power failure - higher priority.
User interrupt.e.g. new user log on request.
The reason is that a new user can wait but the data that needs to be saved before the power failure.

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

State two reasons why memory management is necessary.

A

To allocate memory to allow separate processes to run at the same time.
To deal with allocation when paging/segmentation.
To reallocate memory when necessary.
To protect processes/data from each other.
To protect the operating system/provide security.
To enable memory to be shared.

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

State why virtual memory may be needed.

A

To allow programs to run that need more memory than is available.

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

State what software is required to run intermediate code.

A

Interpreter/virtual machine.

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

State one disadvantage of using intermediate code.

A

The program runs more slowly.
It has to be translated each time it is run.
It needs additional software.

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

State the two features of the Von Neumann Architecture.

A

Single control unit/processor.

Programs stored with data in the same format processed one instruction at a time.

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

A: 1001 | 0110
B: 0011 | 1010

State which of these numbers have been normalised giving a reason for your answer.

A

A

The first two bits are different (start with 10) whereas B starts with 00.

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

State the meaning of a static data structure.

A

Size is fixed when a structure is created/size can not change during processing.

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

State one advantage of using a static data structure over a dynamic data structure.

A

Amount of storage is known/easier to program.

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

State what data structure is used when procedures are called during program execution.

A

Stack.

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

State two ways in which paging and segmentation are similar.

A

Both are ways of partitioning memory.

Both are in the backing store/virtual memory.

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

State one difference between paging and segmentation.

A

Segments are different sizes but pages are fixed in size.

Segments are complete sections of programs but pages are made to fit sections of memory.

Segments are logical divisions but paging are physical divisions.

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

State the format of the mantissa of a normalised floating point binary number.

A

Exponent is adjusted so that the mantissa starts with 01 or 10.

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

State the meaning of a dynamic data structure.

A

Size changes as data is added and removed/size is not fixed.

23
Q

State one type of data structure which must be static.

A

Array/fixed length record.

24
Q

State the type of data structure which is used to handle procedure calling and parameter passing.

A

A stack.

25
Q

State the meaning of a primary key.

A

Unique identifier in a table.

26
Q

State when a boot file is used.

A

While the operating system is loading.
When the computer system is switched on.
After POST.

27
Q

State the purpose of a boot file.

A

Provides personal settings.

28
Q

State three features of a Complex Instruction Set Computer (CISC) architecture.

A

Uses complex instructions each of which may take multiple cycles.

Single register set.

Many instructions are available.

Many addressing modes are available.

29
Q

State one feature of a quick sort which is not used in an insertion sort.

A

Set of numbers broken into multiple sets.

Uses pivots.

30
Q

State one advantage of reverse Polish notation compared with the usual (infix) algebraic notation.

A

Any expression can be processed in order (left to right).

No rules of precedence are needed/no brackets are needed/unambiguous

31
Q

State the meaning of secondary key.

A

An attribute that can be used to search for a group of records.
Or allows records to be accessed in a different order.

32
Q

State the purpose of an interrupt and give one example of a high priority interrupt.

A

Power failure.

To alert the processor that a task needs attention/requests processing time.

33
Q

On completion of processing an interrupt, state the steps that need to be taken before resuming the processing of the original job.

A
Reset flag(s) to inactive state.
Check for further interrupts…
… & service them if necessary
Restore contents of registers (from stack).
34
Q

State the type of language that an assembler processes to produce machine code.

A

Assembly language.

35
Q

State two features of files that can be merged.

A

Records have a common key.

Files each have a record sorted into the same order.

36
Q

State two uses of a queue in a computer system.

A

Spool queue/jobs waiting for printer.
A job queue in a batch processing system.
Handling of jobs in a round robin system.

37
Q

State what validation must be done before adding a new data item to a queue.

A

Check that the queue is not already full.

38
Q

State what validation must be done before removing a new data item to a queue.

A

Check that the queue is not empty.

39
Q

State three benefits of using procedures.

A

Procedures are tested separately.
Easier to maintain the program.
The main program is simpler/code is clearly structured.

40
Q

State two tasks a DBMS performs.

A
Finds data.
Adds new data.
Updates data.
Maintains indexes.
Enforces data integrity rules.
Manages access rights.
41
Q

State the term used to describe fixed data structures.

A

Static.

42
Q

State the condition of the pointers in a queue when the queue is empty.

A

Pointers have same value/point to same location.

43
Q

State one application for which a flat file may be more appropriate than a relational database and give a reason for your answer.

A

List of names & addresses for personal use on home computer.

Because it has a simple data structure/easy to maintain/only small amount of data stored.

44
Q

State how a foreign key is used in a database.

A

Primary key from one table…
…used as an attribute in another…
…to link tables/provide relationship between tables.

45
Q

State the stage at which tokens are created.

A

Created during lexical analysis.

Used for reserved words/keywords.

46
Q

State the use of a LIFO data structure in a computer system.

A

Storing return addresses (during subroutine).

Storing contents of registers while processing interrupt.

47
Q

State why a procedural language may be used for stock control.

A

Set tasks to be completed in a specific way.

48
Q

State why a declarative language may be used for medical diagnosis.

A

Expert system/answer to a question affects next question.

49
Q

State the need for Backus-Naur form in Computing.

A

To define terms unambiguously in a computer language..

50
Q

State the purpose for which relative addressing is used.

A

Can be used for arrays/branching.

51
Q

State two types of interrupt.

A

Power (failure).
Peripheral/I/O interrupt.
Clock interrupt.
Software interrupt.

52
Q

Represented in normalised floating point binary notation using 4 bits for the mantissa and 4 bits for the exponent, both in two’s complement, state which of the following are following the correct format, giving reasons for your answer.

X 1000 0111
Y 1110 0111
Z 0101 0101

A

X & Z

First two bits of mantissa are different.

53
Q

State the features of an interpreter?

A

Translates one line/statement…
…then allows it to be run before translation of next line
reports one error at a time…
…and stops