Computer Science Paper 1 HL
Computer Science Paper 1 HL
BACCALAURÉAT INTERNATIONAL
BACHILLERATO INTERNACIONAL
COMPUTER SCIENCE
HIGHER LEVEL
PAPER 1
2 hours
INSTRUCTIONS TO CANDIDATES
880-391 7 pages
–2– N00/650/H(1)
SECTION A
10. Identify the truth table for A xor B and state the Boolean expression for A
xor B using only and, or and not operators. [5 marks]
11. When a document needs to be sent from one country to another, it is much
faster to send it by email rather than by normal mail. Outline one further
advantage of email over normal mail, and one disadvantage. [4 marks]
880-391
–3– N00/650/H(1)
SECTION B
12. Below is an algorithm fragment which is part of a procedure, ABC, which uses three
parameters. An example call to the procedure is ABC(DATA,LENGTH,COUNT).
Where:
(b) Trace the algorithm fragment with the data given, using the following
trace table format:
3 4 1
[3 marks]
13. When two numbers are added together, the sign of the result depends on whether either, or
both, of the numbers are negative, and whether the absolute value of the first number is larger
than the absolute value of the second number. Some examples are:
7 + 5 = 12
5 + 7 = 12
7 + (–5) = 2
5 + (–7) = –2
–7 + 5 = –2
–5 + 7 = 2
–7 + (–5) = –12
–5 + (–7) = –12
Based on the values of F, S and B, the Boolean value N is set to true if the result of the
addition is negative, and false otherwise. (The absolute values of the two numbers are never
equal within this program and neither are zero.)
(b) From the table given in (a), state a Boolean expression for N in terms of
F, S and B. [1 mark]
(d) When performing the above addition using 8-bit two’s complement
storage of integers, the answer –96 is output for 80+80. Explain why
this occurred. [2 marks]
880-391
–5– N00/650/H(1)
14. A bank pays a bonus once a year to customers. Customers receive money for each year they
have stayed with the bank. All year data is still saved in databases as a 2-digit number. For
example, 87 for 1987.
The algorithm for calculating the number of years, YEARS, used to include the calculation:
YEARS <-- NOW - JOIN
where NOW is the current year and JOIN is the year that the customer joined the bank.
(ii) Deduce the conditions for which the new algorithm will work, and
identify data to support your answer. [4 marks]
The bank used a qualified software engineer to construct the initial program, who supplied
user documentation, system documentation and a test plan. The program used a number of
small modules.
(b) Explain two ways in which the system documentation would have
helped the bank amend the YEARS algorithm. [4 marks]
15. A machine has a rotating part that works under high temperatures. Three sensors are used to
measure the temperature at one place in the machine.
Temperature sensors
Processor
X
(a) Suggest why three sensors are used, rather than one. [2 marks]
(c) Outline how polling is used by the processor to read the temperatures. [3 marks]
The sensors can be linked to the processor with either serial or parallel
connections.
880-391
–7– N00/650/H(1)
16. A business has a local area network. In one office a secretary is using a word processor whilst
the local disk is being defragmented. In another office the finance manager is accessing
payroll data from the central files. Both users are connected to the LAN.
(b) Explain how the secretary’s terminal can be executing two programs
apparently at the same time. [3 marks]
(c) Explain how an email message is sent from the finance manager to the
secretary. [4 marks]
880-391