2000-CE COMP STUD PAPER 1 B
HONG KONG EXAMINATIONS AUTHORITY HONG KONG CERTIFICATE OF EDUCATION EXAMINATION 2000
COMPUTER STUDIES PAPER 1 8.30 am – 10.30 am (2 hours) This paper must be answered in English
1.
This paper consists of two sections, A and B. and Section B carries 48 marks.
2.
Section A consists of multiple-choice questions printed in a separate question book.
3.
Answer only four questions in Section B. printed in this question book.
4.
Diagrams in the paper are not necessarily drawn to scale.
香 港 考 試 局 保 留 版 權
Hong Kong Examinations Authority All Rights Reserved 2000
2000-CE-COMP STUD 1B–1
Section A carries 50 marks
Questions in Section B are
There are six questions in this section. any four questions. 1.
Each question carries 12 marks.
Answer
Many supermarkets install bar code scanners at cashier counters to read the bar code of each item. Besides a scanner, a keyboard is also installed as an input device. (a) A file is used to store the details of all items. The information in this file is accessed immediately after the bar code of an item is read by the scanner. Suggest ONE suitable file organization for the file. for your answer.
Give ONE reason (2 marks)
(b) (i) Give TWO advantages of not marking prices on individual items. (ii) Describe TWO situations when a keyboard, instead of the bar code scanner, must be used to enter a bar code number. (iii) Give TWO advantages of using bar code scanners in supermarkets. (6 marks)
2000-CE-COMP STUD 1B−2
−1−
保留版權 All Rights Reserved 2000
(c) Prices are shown on the shelves and are not marked on individual items. The file used to store the information of an item has the following structure: Field Name
Description
ITEM_NUMBER
Unique number of the item
ITEM_NAME
Name of the item
ITEM_PRICE
Price of the item
MIN_STOCK
The minimum stock quantity of the item
To avoid having an item become out-of-stock, the manager writes a program to monitor the inventory and to place an order when necessary. Suggest ONE field that should be added to the above file. Briefly describe the algorithm of the program. (4 marks)
2000-CE-COMP STUD 1B−3
−2−
保留版權 All Rights Reserved 2000
Go on to the next page
2.
Sean is a programmer at Digit Limited (DL). His supervisor, Suzanna, is the systems analyst. Sean sometimes needs to consult Andrew, a systems programmer, about his programming work. (a) Describe ONE job duty of each of the following persons: (i) programmer (ii) systems analyst (2 marks) (b) Describe ONE task involved in each of the following stages of computerization: (i) system implementation (ii) system maintenance and evaluation (2 marks) (c) Sean’s computer program is compiled with source codes from a shareware. (Shareware is copyrighted software that is distributed on try-before-you-buy basis.) Explain whether it is legal for Sean to use the source code in DL for commercial purposes before paying the fee. (1 mark) (d) Suppose that the source code of the shareware contains a program segment that generates a computer virus which causes the computer system to crash. Name TWO parties that could be held responsible for the problem. Give ONE reason why each of the two parties could be held responsible. (4 marks)
2000-CE-COMP STUD 1B−4
−3−
保留版權 All Rights Reserved 2000
(e) Sean writes a program in assembly language. The following is the segment of that program with its equivalent machine code in hexadecimal. Machine Code
Assembly Language
Memory Address
Opcode Operand
Opcode Operand
04000 04006 0400C
207C 2001 3010
LDA INC OUT
001000 00100A 002000
001000 00100A 002000
See the appendix of Paper 1A for the list of commands in mnemonics. All numbers are in hexadecimal. (i) Why must a program written in assembly language be translated into machine code before execution? (ii) What are the contents stored in MDR and MAR immediately before the execution of "INC 00100A" in the above segment? (3 marks)
2000-CE-COMP STUD 1B−5
−4−
保留版權 All Rights Reserved 2000
Go on to the next page
3.
Study the following segment of an assembly language.
Data Area
Program Area
Memory Address 002000 002004 002008 00200C 002010 . . . 004000 004004 004008 00400C 004010 004014 004018 00401C 004020 004024 004028 00402C 004030 004034
Memory Content 00 000004 00 000000 00 0000FF 00 000000 00 000000 . . . LDA 002000 JPZ 004034 INP 002004 LDA 002004 SUB 002008 JPN 004020 INC 00200C JMP 004024 INC 002010 OUT 00200C OUT 002010 DEC 002000 JMP 004000 STP
See the appendix of Paper 1A for the list of commands in mnemonics. numbers are in hexadecimal.
All
(a) (i) What is the number of bytes in each memory content? (ii) What is the last address of the memory location that can be used to store data? (iii) What is the maximum number of memory content in the data area? (4 marks)
2000-CE-COMP STUD 1B−6
−5−
保留版權 All Rights Reserved 2000
(b) Suppose the above program segment is executed, and the following numbers (in decimal) are entered: 100, 515, 25, 255 (i) Give the output of the program. (ii) What is the function of the constant 4 at memory address 002000 in the program segment? (iii) What is the purpose of the above program segment? (8 marks)
2000-CE-COMP STUD 1B−7
−6−
保留版權 All Rights Reserved 2000
Go on to the next page
4.
Suppose the word length of a computer is 6 bits. All computers are linked up in a computer network system and each computer has a unique network identification number (Net ID). Each Net ID consists of 2 words. For example, the bit patterns of Net ID 23-41 (in decimal) and 56-16 (in decimal) are as follows: Decimal equivalent: Bit pattern:
23 0 1 0 1 1 1
41 - 1 0 1 0 0 1
Decimal equivalent: Bit pattern:
56 1 1 1 0 0 0
16 - 0 1 0 0 0 0
(a) Write the bit pattern of Net ID 5-12. (1 mark) (b) Write the largest Net ID (in decimal). (1 mark) There are 3 types of network in the system. Each network type has different format of Net ID. Each Net ID has 3 parts: network type, LAN number and computer number. Type A Net ID format: the first bit of the bit pattern is "0" 0 N N N C C - C C C C C C Type B Net ID format: the first two bits of the bit pattern are "10" 1 0 N N N N - N N C C C C Type C Net ID format: the first two bits of the bit pattern are "11" 1 1 N N N N - N N N N C C (N denotes bits storing the LAN number and C denotes bits storing the computer number) Net ID
For example: bit pattern
Network LAN number Computer number type in binary in decimal in binary in decimal 23-41 010111-101001 A 101 5 11101001 233 56-16 111000-010000 C 10000100 132 0 0
2000-CE-COMP STUD 1B−8
−7−
保留版權 All Rights Reserved 2000
(c) Complete the following table and copy the table in your answer book. Net ID
bit pattern
Network LAN number Computer number type in binary in decimal in binary in decimal
31-1 011111-000001 (5 marks) (d) Suppose Mr. Ho wants to build a type B network with LAN number "110101". The smallest Net ID of the network is 45-16. (i) Write the largest valid Net ID of this local area network in both binary and decimal format. (ii) Suppose each computer has a unique computer number. What is the maximum number of computers that can be linked up in the local area network? (5 marks)
2000-CE-COMP STUD 1B−9
−8−
保留版權 All Rights Reserved 2000
Go on to the next page
5.
Peter and Mary participate in a computer-controlled toy car maze competition. They have to complete 5 tasks for the competition as follows: 1. 2. 3. 4. 5.
buy a toy car build the interface between the car and the control computer write a control program to control the movements of the car write a program to guide the car to exit from a maze write documentation for the competition
Peter and Mary plan to write programs in Pascal and assembly languages for task 3 and task 4. (a) Which of the two programming languages mentioned above is a lowlevel programming language? (1 mark) (b) Which one of the above programming languages is more suitable for writing the program for task 3? Give TWO reasons for your choice. (3 marks) (c) Which one of the above programming languages is more suitable for writing the program for task 4? Give TWO reasons for your choice. (3 marks) Peter and Mary write a user's manual and a programmer's guide. (d) (i) Name any TWO items that should be included in the user's manual. (ii) Name any TWO items that should be included in the programmer's guide. (4 marks) (e) Suggest ONE programming practice that can improve the readability of a high-level program. (1 mark)
2000-CE-COMP STUD 1B−10
−9−
保留版權 All Rights Reserved 2000
6.
A secondary school has been using several English-version office automation software packages which consist of word processing software and spreadsheet software. The word processing software is used to prepare administrative documents, teaching notes, assignments and test papers while the spreadsheet software is used to handle school accounting data and the academic records of students. This year, the school plans to upgrade the office automation software packages to increase the use of information technology in teaching, to improve daily communication among its staff and students and to computerize its student attendance record system. (a) Name THREE additional types of software that should be included in this upgrade exercise. State ONE corresponding application for each type of software. (6 marks) In addition, the school changes its language for teaching from English to Chinese in all Secondary One classes. As a result, the school has to acquire office automation software package which supports both Chinese and English. (b) Some teachers have difficulties in inputting Chinese characters with keyboards. Name TWO alternate methods that can input Chinese characters. (2 marks) (c) A teacher makes use of the upgraded word processing software to prepare an English test paper in school. However, he cannot open the document at home with his old English version word processing software. (i) Explain why the teacher cannot open the document. (ii) Suggest ONE method the teacher can use to avoid the problem without any additional cost. (4 marks) END OF PAPER
2000-CE-COMP STUD 1B−11
− 10 −
保留版權 All Rights Reserved 2000