0% found this document useful (0 votes)
115 views

Computer Science Paper 1 HL

This document contains a 16 question exam on computer science. It tests knowledge of topics like: - Networking components and functions - Data structures like queues and buffers - Algorithms including quicksort and hashing - Software development lifecycle stages - Object-oriented programming concepts - Database usage advantages - Boolean logic and expressions - Programming concepts like parameters, modules, and polling - Features of local area networks The exam contains multiple choice, short answer, and longer explanatory questions testing a range of computer science knowledge.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views

Computer Science Paper 1 HL

This document contains a 16 question exam on computer science. It tests knowledge of topics like: - Networking components and functions - Data structures like queues and buffers - Algorithms including quicksort and hashing - Software development lifecycle stages - Object-oriented programming concepts - Database usage advantages - Boolean logic and expressions - Programming concepts like parameters, modules, and polling - Features of local area networks The exam contains multiple choice, short answer, and longer explanatory questions testing a range of computer science knowledge.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

INTERNATIONAL BACCALAUREATE N00/650/H(1)

BACCALAURÉAT INTERNATIONAL
BACHILLERATO INTERNACIONAL

COMPUTER SCIENCE
HIGHER LEVEL
PAPER 1

Thursday 9 November 2000 (afternoon)

2 hours

INSTRUCTIONS TO CANDIDATES

! Do not open this examination paper until instructed to do so.


! Answer all of Section A.
! Answer four questions from Section B.

880-391 7 pages
–2– N00/650/H(1)

SECTION A

Answer all questions in Section A.

1. State the function of a router in a network. [1 mark]

2. Define the term buffer. [2 marks]

3. (a) Define the term queue. [2 marks]

(b) Describe an application that uses a queue in a computer system. [2 marks]

4. State the efficiency of the quicksort in BigO notation. [1 mark]

5. Memory in a certain random access secondary storage device is allocated


using a hash algorithm.

(a) State why clashes sometimes occur. [1 mark]

(b) Outline one method of dealing with clashes. [2 marks]

6. Program construction (which includes testing and debugging) is one of the


stages in the software life cycle. Outline three other stages. [6 marks]

7. Discuss whether parameters passed into a function should be pass-by-value or


pass-by-reference. [4 marks]

8. Outline the terms encapsulation and polymorphism with respect to


object-oriented programming. [4 marks]

9. Explain two benefits of sharing a database on a local area network. [6 marks]

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

Answer four questions.

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).

HALF <-- LENGTH div 2


MIDDLE <-- HALF + 1
for POSITION <-- 1 upto HALF do
SAME <-- DATA[MIDDLE+POSITION] = DATA[MIDDLE-POSITION]
if SAME then
COUNT <-- COUNT + 1
endif
endfor

Where:

DATA is an integer array containing 9 3 1 0 1 4 9


[1] [2] [3] [4] [5] [6] [7]

LENGTH is an integer variable containing 7, and


COUNT is an integer variable initially containing 0.

(a) State the data type of SAME. [1 mark]

(b) Trace the algorithm fragment with the data given, using the following
trace table format:

HALF MIDDLE POSITION SAME COUNT

3 4 1
[3 marks]

(c) Explain the purpose of the algorithm. [2 marks]

(d) Explain why COUNT should be a pass-by-reference parameter. [2 marks]

(e) Explain why ABC could be declared as a function, rather than a


procedure. [2 marks]

880-391 Turn over


–4– N00/650/H(1)

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

A test is used in a program using the Boolean values F, S and B, where:

F is true if the first number is negative;


S is true if the second number is negative;
B is true if the absolute value (abs) of the second number is larger than the absolute value of
the first number.

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.)

(a) Construct the truth table for N in relation to F, S and B. [4 marks]

(b) From the table given in (a), state a Boolean expression for N in terms of
F, S and B. [1 mark]

(c) Simplify the expression for N given in (b). [3 marks]

(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.

This calculation was changed a year ago to:

if NOW < JOIN then


YEARS <-- NOW + 100 - JOIN
else
YEARS <-- NOW - JOIN
endif

(a) (i) Outline why the algorithm was changed. [2 marks]

(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]

880-391 Turn over


–6– N00/650/H(1)

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]

(b) State what process is taking place at X. [1 mark]

(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.

(d) Compare two features of serial and parallel connections. [4 marks]

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.

(a) Outline why a disk needs to be defragmented. [3 marks]

(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

You might also like