Markscheme: November 2000
Markscheme: November 2000
Markscheme: November 2000
INTERNATIONAL BACCALAUREATE
BACCALAURÉAT INTERNATIONAL
BACHILLERATO INTERNACIONAL
MARKSCHEME
November 2000
COMPUTER SCIENCE
Higher Level
Paper 2
16 pages
–6– N00/650/H(2)M
(NOTE: for full marks the candidate must make clear that COMMENT is set to false, i.e.
not just true is set.)
if COMMENT then
if POSITION = 2 then
LINE <-- ""
else
LINE <-- copy(LINE,1,POSITION-2)
endif
endif
procedure CREATELIST
newtype NODE record
NUMBER integer
TEXT string
NEXT pointer->NODE
endrecord
open(STYLE)
ROOT <- nil
while not eof(STYLE) do
input(STYLE) LINE
allocate(TEMP)
TEMP->NUMBER <- CONVERT(copy(LINE,1,4))
TEMP->TEXT <- copy(LINE,5,length(LINE)-4)
– [5 marks] for correctly placing contents into TEMP->NUMBER and TEMP->TEXT (order is
unimportant, i.e. TEMP->TEXT could be assigned first:
– ([1 mark] for using TEMP->NUMBER and TEMP->TEXT precisely, this is given in the
question, so NO marks for NUMBER and TEXT only;
– [2 marks] for using CONVERT correctly to extract the value from the comment with
copy, ([1 mark] for a good, but incorrect, attempt e.g. "CONVERT(first 4 characters)",
"CONVERT(LINE,1,4)", CONVERT (LINE[1-4])" etc., NO marks for just CONVERT on
its own, e.g. TEMP->NUMBER <- CONVERT(LINE))
– [2 marks] for assigning text part correctly, i.e. copy(LINE,5,length(LINE)-4),
(ACCEPT -5 at the end, even though incorrect, exam nerves and all, for [2 marks]; also
accept equivalent, precise statements not in PURE, e.g. "extract substring from character
5 to the end of the string") ([1 mark] for a good, but incorrect, or vague attempt, e.g.
"extract substring except first 5 characters").)
– [4 marks] for correctly assigning the pointers:
– ([2 marks] for making the record the head of the list, i.e. TEMP->NEXT <- ROOT (or
equivalent); [1 mark] for any attempt at assigning TEMP->NEXT, but incorrectly;
– [2 marks] for reassigning the head of the list, i.e. ROOT <- TEMP; ([1 mark] for any
attempt at assigning ROOT, but incorrectly).)
2. (a) (i) – Faster to read off card (than read from central database) [1 mark]
– or could be used if link to central computer is down [1 mark]
(d) more/larger/bigger storage space (do not accept “because it’s bigger) [1 mark]
(e) (Award [1 mark] for a valid reason and [1 mark] for a suitable elaboration for two
reasons up to a max of [4 marks]:)
– fear of security, [1 mark] e.g. bank staff may accidentally see medical details [1 mark]
– if reader of paramedics breaks down [1 mark] can’t find information because not
human-readable [1 mark]
– can’t see data [1 mark] so there might be a mistake [1 mark]
– with all data on 1 card [1 mark] if lose it, lose loads of information [1 mark].
PIN
can be
combined{ statement request/option
acknowledgement
ATM
program/process
3. (a) (Award [1 mark] for each of the following points, up to a maximum of [4 marks]:)
OR
PREV <-- -1
POS <-- ROOT
if PREV = -1 then
ROOT <-- PTR[ROOT]
else
PTR[PREV] <-- PTR[POS]
endif
endprocedure REMOVE
– 12 – N00/650/H(2)M
(c) (Award [1 mark] for any of the following points, up to a maximum [4 marks]:)
(Allow brief points, e.g. “there is a fixed limit for the list”, “memory not allocated in
run-time” etc.)
– 13 – N00/650/H(2)M
However, the candidate may add new ideas, which are acceptable, for example:
– The master file may also have an index to access data
– The transaction file will be sorted using the same key
– Each record from the (sorted) transaction file is read in turn
– Each record from the master file index is read in turn
– If the keys match, the block at the address given is read
– The record is located by a (linear) search of the records read
– (or for [1 mark], the record at the address generated is read)
– The record is updated with the new data from the transaction record
– The record is written back to the master file
– This continues until the end of the transaction file
(b) (i) (Award [1 mark] for any situation where the transaction file could be corrupted,
e.g. fire, theft, flood, any physical/software created damage, even accept “if the
transaction file gets corrupted”.)
Examples:
– ‘Regular backups are made’, ‘Regular backups are made by copying transaction
file’, ‘Backups are made every day’ all get [1 mark].
– ‘Backups are made after each change to the transaction file’, ‘Backups are
made frequently during the day to minimise data loss’, ‘Backups are made
daily, and the cheques kept to re-enter if the backup is needed’ all get [2 marks].
(c) (Award [1 mark] for each of the points below, depending on the method used:)
OR
– A separate (full) index with the address for all records is used
– Ordered/sorted on account number
– Each record is read/used to give the address of the main file record to read
– The record is read at the address from the index and printed.
– 15 – N00/650/H(2)M
5. (a) (Award [1 mark] for any of the following points up to a maximum of [4 marks]:)
– [1 mark] for the ALU carries out the operation based on a signal from the Control
Unit/CU
– [1 mark] from decoding the (current) instruction/op-code
– [1 mark] the accumulator is a register
– [1 mark] where intermediate/final results
– [1 mark] of calculations/logic instructions are stored
– [1 mark] it has a direct link/bus to/from the ALU
– [1 mark] and is faster than using main memory/RAM.
(c) (Award [1 mark] for a limitation, and [1 mark] for its implication:)
(d) (Award [1 mark] for identifying that it is required to store any temporary data or data
entered by the user or sensors, i.e. any of the following:)
(Do NOT accept ‘to store program instructions’ (the question states all software is in
ROM).)
– 16 – N00/650/H(2)M
(e) (Award [2 marks] for a clear description, [1 mark] for a partial answer:)
– the register can have a fixed point [1 mark] set so that there are a set number of bits
after the point [1 mark];
– a register can store the integer part [1 mark] and another can store the fraction part
[1 mark];
(Do NOT award marks just for a statement similar to “use real/float values”.)