F453 Explain Flashcards

1
Q

Explain why interrupts are used in a computer system.

A
To obtain processor time...
For a higher priority task,
To avoid delays,
To avoid loss of data,
As an indicator to the processor…
That a device needs to be serviced.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain why jobs are given different priorities when in a job queue.

A

Some jobs are more urgent than others,

Priorities are used to maximise the use of the computer resources.

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

Explain the term array processor.

A

A processor that allows the same instruction to operate simultaneously…
…on multiple data locations,
The same calculation on different data is very fast,
Single Instruction Multiple Data (SIMD).

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

Explain one advantage of a binary search compared with a serial search when searching for an item in any large set of data.

A

(usually) faster because…

…half of data is discarded at each step/fewer items are checked.

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

Explain how quick sort can be used to put a set of numbers into ascending numerical order.

You may use these set of numbers to help explain the quick sort routine.

30 9 46 14 22

A

Highlight first number in the list (the ‘search number’)
pointer at each end of list,
Repeat:
Compare numbers being pointed to…
…if in wrong order, swap,
Move pointer of non-search number,
Until pointers coincide so search number in correct position,
Split list into 2 sublists,
Quick sort each sublist,
Repeat until all sublists have a single number,
Put sublists back together.

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

Explain the term inheritance.

A

A class has all the attributes and operations of its superclass…
…and may also have attributes & operations of its own,
Example…

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

Explain the term object.

A

An instance of a class,
A real-world entity,
Holds attributes and methods.

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

Explain the term class.

A

A template for…
…a set of objects…
…that have state and behaviour.

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

Explain the term op code.

A

The mnemonic part of the instruction/that indicates what it is to do/code for the operation.

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

Explain the purpose of the accumulator.

A

Temporary storage (within ALU),
Holds data being processed/used during calculations,
Deals with the input and output in the processor.

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

Explain why it is NOT possible to use ONLY direct addressing in assembly languages.

A

Number of addresses available is limited…
…by the size of the address field
Code is not relocatable/code uses fixed memory locations.

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

Explain the use of primary keys in database.

A

Unique identifier

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

Explain the use of foreign keys in database.

A

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

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

Explain the term data dictionary in databases and give two examples of the information it stores.

A
A file containing descriptions of data in database,
Used by database managers…
…when altering database structure,
Uses metadata to define the tables.
Examples:
Names of tables/columns,
Characteristics of data (eg length, data type),
Restrictions on values in columns
Meaning of data columns,
Relationships between data,
Which programs can access data,
Identifies primary keys,
Identifies foreign keys,
Identifies indexes,
Defines access rights.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Explain the purpose of a translator

A
  • convert from source code…
  • …to object code
  • detect errors in source code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain why intermediate code may be more useful than executable code

A

• can run on a variety of computers
• same intermediate code can be obtained from
different high level languages
• improves portability

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

Explain the term co-processor

A
  • an additional processor
  • …used for a specific task
  • improves processing speed by executing concurrently
  • eg maths co-processor/floating point accelerator
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain the term backtracking and give one example of backtracking

A
  • after finding a solution (to a goal)
  • go back and follow an alternative path…
  • …to attempt to find another solution
  • (after step 6) step 7 is the same as step 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Explain the term mnemonics

A
  • a code that is easily remembered…
  • …used to give the opcode/instruction
  • e.g. ADD
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Explain the term flow-control

A

• the order in which instructions are executed
• the order may be changed by a jump
instruction/conditional jump instruction

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

Explain why Unified Modelling Language (UML) is used

A

• a standard way to present (information)…
• …the design of a system…
• …which is visual, so easy to understand
• allows systems analysts, programmers and clients to
communicate
• makes system maintenance easier…
• …when modifying a system

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

In the context of printing, explain why spooling is used

A

 output data to disk drive/storage device
 for printing at another time
 to allow sharing/on a network
 job references stored in a queue/buffer
 avoids delays / avoids speed mismatch
 as printers are relatively slow
 jobs can be prioritised

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

Explain one problem that may occur using paging and segmentation

A

 disk threshing
 more time spent swapping pages than processing
 computer may ‘hang’

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

Explain the term intermediate code and its use.

A

 simplified code / partly translated code…
 …which can be run on any computer/virtual machine/improves portability…
 …using an interpreter
 sections of program can be written in different languages
 runs more slowly than executable code

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

Explain the term register

A

 a location in the processor
 used for a particular purpose
 (temporarily) stores data/or control information
 explained example of contents held by named register

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

Explain the advantages and disadvantages of parallel processor architecture compared with Von Neumann architecture

A

advantages:
 allows faster processing
 more than one instruction (of a program) is processed at the same time
 different processors can handle different tasks/parts of same job
disadvantages:
 operating system is more complex…
 …to ensure synchronisation
 program has to be written in a suitable format
 Program is more difficult to test/write/debug

27
Q

Consider the normalised floating point number 01111 011. Explain why this number is important.

A

 maximum (positive) number in this format

 as mantissa & exponent each have their largest values

28
Q

Explain the term parameter

A

 (information about) an item of data…
 …supplied to a procedure or function
 may be passed by reference or by value
 used as a local variable

29
Q

Explain how and why the Index Register (IR) is used

A

 used in indexed addressing
 stores a number used to modify an address…
 … which is given in an instruction
 allows efficient access to a range of memory locations/by incrementing the value in the IR
 eg used to access an array

30
Q

Explain why a foreign key is also a primary, but a primary key need not be a foreign key

A

 foreign key links tables (to represent many to one relationship)…
 …so that only one record is accessed/to avoid duplicate data
 eg primary key from B used as foreign key in C from (a)
 primary key is in a table that may contain data not required in another table
 eg primary key from C is not used in B and hence cannot be a foreign key

31
Q

Explain the difference between VARCHAR and CHAR data types

A

 CHAR is fixed length

 VARCHAR is variable length

32
Q

Explain virtual memory

A

 use of backing store…
 …as additional memory
 uses paging / swapping pages (between memory &
backing store)
 holds part of the program not currently in use
 allows large programs to run (when memory size is
insufficient)

33
Q

Explain the purpose and use of the File Allocation Table (FAT)

A

 a map of where files are stored…
 …in backing store/hard disk
 provides addresses/pointers to (start of) files
 stores file names
 stores file sizes
 stores access rights
 identifies free space
 is updated by the operating system when files are
saved/deleted
 Is used by the operating system when files are accessed

34
Q

Explain the term source code

A

 the original code/code written by the programmer…
 …often in a high level language
 may be in assembly language
 source code can be understood by people…
 …but cannot be executed (until translated)

35
Q

Explain why library routines help programmers and describe how library routines are used

A
Library routines: 
 routines are pieces of software… 
 …which perform common tasks… 
 …such as sorting/searching 
 routines are compiled 
Why library routines help programmers: 
 routines are error-free/have already been tested 
 already available/ready to use/saves work/saves time 
 routines may be used multiple times 
 routines may have been written in a different source 
language 
 allows programmer to use others’ expertise 
How routines are used: 
 linker is used… 
 …to link routine with program 
 loader handles addresses… 
 …when program is to be run
36
Q

Explain one disadvantage, other than cost, of a CISC architecture compared with a Reduced Instruction Set Computer (RISC) architecture.

A
 uses (complex) instructions each of which may take 
multiple cycles 
 single register set 
 instructions have variable format 
 many instructions are available 
 many addressing modes are available
37
Q

Explain what happens when the denary number +5.25 is converted to a normalised floating point binary number in the format: 4 mantissa and 4 exponent

A

 +5¼ = 101.01 in pure binary
 mantissa is 010101, but only 4 bits allowed…
 …so mantissa would be 0101 (5 stored, not 5¼)
 value stored is inaccurate/precision lost
 exponent is 0011 (3)
 number would be stored as 01010011

38
Q

Explain the use of an operand in an assembly language instruction

A

 address field (in an instruction)
 it holds data…
 to be used by the operation given in the opcode
 eg in ADD 12, “12” is the operand

39
Q

Relational databases can be used to produce reports.

Explain the term report and state two features, other than the report layout, included in a report definition.

A

 presentation of selected data…
 …usually in the form of a table/specific layout
 may be defined in advance…
 …so the user does not need to set it up

Features of report definition
 a query
 a display order

40
Q

Explain how an interrupt is detected during a fetch-execute-cycle

A

 Interrupt register is checked…
 when each cycle completed
 by comparing priority of the current task with interrupt
register

41
Q

Explain the use of an accumulator in a processor

A
 holds data being processed 
 temporary storage of intermediate results (in the 
ALU) 
 is where calculations are performed 
 input & output data passes through
42
Q

Explain one advantage and one disadvantage of a binary search compared with a serial search in any list of data

A

advantage:
 (usually) faster because…
 …fewer items are checked/more efficient for large
files
disadvantage:
 items must be in an order…
 …to allow appropriate items to be discarded

43
Q

Explain the purpose of an object diagram

A

 give information about instances of a class…

 …& how they link (at specific times)

44
Q

Explain what must be added to an object diagram for it to become a communication diagram

A
 message/interaction… 
 …from one object to another 
on diagram 
 arrow… 
 with appropriate label
45
Q

Explain the term global variable and give one example of its use

A

 a variable defined at the start of a program
 exists throughout program…
 including functions & procedures
 allows data to be shared by modules
 overridden by local variables with same name
 eg VAT rate

46
Q

Explain the term local variable and give one example of its use

A
 a variable defined within one module… 
 & only accessible in that module 
 data is lost when module is completed 
 same variable name may be used in different 
modules 
 eg loop counter
47
Q

A computer uses a number of registers.

Explain why registers are used rather than Random Access Memory

A

 faster to access than Random Access Memory
 used for specific purposes…
 …which involve frequent access

48
Q

Explain the purpose of scheduling

A

 ensure all jobs are processed/changing priorities
where necessary
 process as many jobs as possible (in the least
possible time)
 maximise number of interactive users…
 …receiving fast response times
 utilise resources/processor time efficiently

49
Q

Explain the term priority in relation to jobs awaiting processing

A

 an “order of importance”…

 as some jobs are needed more urgently than others

50
Q

A job with a low priority may have its priority changed by the operating system. Explain why this may be necessary.

A

 to allow it to be processed
 otherwise if higher priority jobs keep occurring
/it would have to wait indefinitely

51
Q

Explain why its NOT possible to represent each of the following denary numbers accurately in the binary representation described.(4 bits for mantissa and 4 for exponent)

130
1 1/6

A

 value is too large/out of range/exponent is too small
 maximum value stored is 0111 0111
 …which is 1110000. = 112

 value is 1.0001
 mantissa needed is 010001…
 which has 6 bits but only 4 are available…
 so exact value cannot be stored

52
Q

Explain the term derived classes

A
 a class that has all the attributes & operations of its 
superclass… 
 …& may have attributes & operations of its own
53
Q

Explain the term procedure

A
 block of code/set of 
instructions/subroutine/subprogram/module… 
 which performs a task 
 receives parameter values 
 uses local variables 
 may return value(s)
54
Q

Explain how parameters are used

A
 supplied to a procedure (or function) 
 pass values between functions/procedures 
 passed by reference… 
 …or by value 
 used as a local variable
55
Q

Explain the term low level languages

A
 machine-oriented language 
 related to design of computer 
 includes assembly language/machine code 
 may use mnemonics (for operations) 
 may use labels (for addresses)
56
Q

Using the instruction ADD 45, explain the term opcode and operand

A

opcode is the instruction to be executed, in this case ADD

operand is the value/address of the data, in this case 45

57
Q

Explain the term secondary key

A

A secondary key is made on a field that you would like to be indexed for faster searches. A table can have more than one secondary key.

58
Q

Explain the term register

A

-Location in the processor
-Used for a particular purpose
-Temporarily stores data/control information
Allows very high speed access. -

59
Q

Explain why its NOT possible to represent each of the following denary numbers accurately in the binary representation described. (3 bits for mantissa and 3 for exponent)
+16

A

. Maximum value is 011011
 Exponent is 3,
 Mantissa 0.11, move point 3 places right becomes 0110 = +6
 Maximum value is +6 so +16 can’t be represented.
Or
 +16 pure binary is 010000
 Mantissa is 0.10
 Point moves 5 places so exponent is +5 or 0101 …
 …which cannot be written in 3 bit twos complement.

60
Q

Explain why a low level language may be suitable for writing a program for the processor in a washing machine

A

 Close to design of processor
 Can access memory locations directly
 The processor in the washing machine has a limited memory.

61
Q

Explain why a high level language may be suitable for writing a program for the processing customer accounts in a bank

A
. Reflects type of problem/problem-oriented
 Allows use of mathematical functions
 Portability
 Uses library routines
 Complexity of problem
 Easy to maintain
62
Q

Explain why indirect addressing is used

A

 Uses address field as a pointer…
 …to address to be used
 Increases the size of the address that can be used…
 ….allowing a wider range of memory locations to be accessed

63
Q

Explain the characteristics of an insertion sort and quick sort using the example set of numbers below. Give an advantage and disadvantage of each

Example number set 25, 7, 48, 19, 32, 21

A

.Insertion sort:
 Insert one number at a time into correct position…
 …so list of sorted numbers is built up
Insertion sort on set of numbers given:
 Insert 25 into new file: 25, 7, 48, 19, 32, 21
 Insert 7: 7, 25, 48, 19, 32, 21
 Insert 19: 7, 19, 25, 48, 32, 21
 Insert 48: 7, 19, 25, 48, 32, 21
 Insert 32: 7, 19, 25, 32, 48, 21
 Insert 21: 7, 19, 21, 25, 32, 48 – sort complete.