2002 Exam HL P2
2002 Exam HL P2
2002 Exam HL P2
1. The temperature of a river (to nearest degree) for one day is being recorded, and the data is
stored in a linked list. Readings are taken every one minute. If the temperature is different
from the last reading, it is added to the list, together with the time, measured as minutes since
midnight.
~~n
4
0
\2~JST123t. cte
Start
In this example the river's temperature was 5°C when read at 56 minutes after midnight and
remained so (to the nearest degree)until 75 minutes after midnight,when it was recorded as 6° C.
(a) In the above diagram, state how many minutes the river temperature was
4°C. [1 mark)
(c) Describe the data structure required for each node ofthe list. [4 marks)
...
(e) Construct an algorithm for a procedure that will return the minimum and
maximum temperatures for the day. Call your procedure MIN- MAX. [7 marks)
222-312
-3- MO2/650/H(2)
(Question 1 continued)
(f) Using your algorithms from parts (d) and (e), construct an algorithm to
transfer the data from a complete list for the day into a two-dimensional
\\
array "Temp" whichstoreseachtemperaturein ascendingorder,and the
total time the river has been at that temperature. For example, part of the
array might look like:
(Temperature) (Time)
Temp [1] [2]
[1] 4 383
[2] 5 58
[3] 6 32
[4] 8 1
[5] 10 72
etc.
999 0 [6 marks]
-4- MO2/650/H(2)
2. (a) Discuss the processor and storage needs of producing CT-scans. [4 marks]
(b) An enlarged detail of aCT-scan is in 8-bit grey scale and has 512 x 512 pixels.
(c) Not all computer abuse is illegal. Using the Case Study as an example,
describe the difference between computer crime and computer abuse,
giving an example of each. [6 marks]
(d) Define the term data compression and explain the two uses of data
compression in the Case Study. [6 marks]
(e) CT-scans are transferred over national lines from the medical scanner
set-up to the University.
Draw a suitable system flowchart to achieve this. You may wish to refer
to the Case Study, page 3, paragraphs 2 and 3, and figure 5 page 13. [8 marks]
)
-5- MO2/650/H(2)
3. A computer program converts an arithmetic expression into a binary tree putting the operators
and operands in reverse order of precedence. For example the expression A* (B+C) -0 is
converted to
\.
J
°B
Note: + has the highest precedence (priority) of all the operators because it is in brackets. The
priorities required in this question are:
1st priority: expressions in brackets
2nd priority: * /
3rd priority: + -
(a) (i) State the expression from thepost-order traversal ofthe tree above. [1 mark)
<.. (ii) State the expression from the in-order traversal of the tree above. [1 mark)
(b) Construct the tree for the expression (A- B) * C+ (0- E) / F. [4 marks)
(c) Describe a record structure that could be used to store a node for such a tree. [3 marks)
\.
222-312 Turn over
-6- MO2/650/H(2)
4. An address generated by the processor is mapped to the physical location of the required data
as part of the memorymanagementfunction of an operatingsystem. This locationmay be in cache
memory, RAM (main memory) or on disk. The data at this address is then located and read.
(a) If the data being read is an instruction, state the step from the Machine
Instruction Cycle that is being carried out. [1 mark)
(b) If the data is being read from disk as if it were held in RAM (that is, as
an extension to RAM):
(ii) compare two aspects of access time when reading data from RAM
with reading data from a disk. [6 marks)
(iii) describe how a hash algorithm may be used to access data on the
disk in this case, and why it may be used rather than using an index. [3 marks)
(c) Outline two further functions of an operating system apart from memory
management. [4 marks)
...
222-312
-7- MO2/650/H(2)
5. A computer is used to enter, store, display and send instructions to machines in a factory.
Because of dirt and physical damage it is continuously breaking down. A systems analyst has
been asked to make a recommendation to improve the situation.
At the moment:
1. input is via the keyboard which gets clogged up
2. ouput is via screen which gets smashed
3. storage, which needs to be portable, is on diskette which gets dirty
4. the communications link is often disrupted
5. the CPU is top of the range to run a Gill
(c) State the name of the report produced by the systems analyst at the end
of the analysis stage and identify two features (sections) within it. [3 marks)
,
"
222-312