Computer Science (9608) · Oct/Nov 2017 · Question paper 11
Cambridge Computer Science (9608) question paper for paper 11, Oct/Nov 2017 — 9608/11/O/N/17, file 9608_w17_qp_11.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 2 8 9 8 7 7 5 3 0 5 *
9608/11
COMPUTER SCIENCE
October/November 2017
Paper 1 Theory Fundamentals
1 hour 30 minutes
Candidates answer on the Question Paper.
No Additional Materials are required.
No calculators allowed.
READ THESE INSTRUCTIONS FIRST
Write your Centre number, candidate number and name in the spaces at the top of this page.
Write in dark blue or black pen.
You may use an HB pencil for any diagrams, graphs or rough working.
Do not use staples, paper clips, glue or correction fluid.
DO NOT WRITE IN ANY BARCODES.
Answer all questions.
No marks will be awarded for using brand names of software packages or hardware.
At the end of the examination, fasten all your work securely together.
The number of marks is given in brackets [ ] at the end of each question or part question.
The maximum number of marks is 75.
This document consists of 16 printed pages.
DC (ST/JG) 129947/3
© UCLES 2017
[Turn over
www.dynamicpapers.com
2
1
(a) Each of the following bytes represents an integer in two’s complement form.
State the denary value.
(i)
0111 0111
Denary
[1]
(ii)
1000 1000
Denary
[1]
(iii)
Express the following integer in two’s complement form.
-17
[1]
(iv)
State in denary, the range of integer values that it is possible to represent in two’s
complement integers using a single byte.
Lowest value
Highest value
(b) (i)
[1]
Convert the following denary integer into Binary Coded Decimal (BCD).
653
[1]
(ii)
0
A 3-digit BCD representation has been incorrectly copied. It is shown as:
1
0
0
1
1
1
0
0
0
1
0
State how you can recognise that this is not a valid BCD representation.
[1]
(iii)
Describe a practical application where BCD is used.
[1]
© UCLES 2017
9608/11/O/N/17
3
2
www.dynamicpapers.com
(a) The diagram shows three items of software that translate program code.
Draw one line from each context to the correct item of translation software.
Item of translation software
Context
A web page contains a client-side script.
Assembler
Each instruction in the source code
consists of an op code and an operand.
Interpreter
The source code is required at run-time.
Compiler
When the source code is translated,
copies of the executable program can be
distributed without the need for the source
code.
[4]
(b) The Java programming language is said to be machine or platform independent.
(i)
Describe what is meant by machine independent.
[1]
(ii)
Describe how a Java source code program is translated.
[2]
© UCLES 2017
9608/11/O/N/17
[Turn over
4
3
www.dynamicpapers.com
A Local Area Network is used by staff in a hospital to access data stored in a Database Management
System (DBMS).
(a) Name two security measures to protect computer systems.
1
2
[2]
(b) A frequent task for staff is to key in new patient data from a paper document. The document
includes the patient’s personal ID number.
(i)
The Patient ID is a seven digit number. The database designer decides to use a check
digit to verify each foreign key value that a user keys in for a Patient ID.
When a user assigns a primary key value to a Patient ID, the DBMS adds a modulus-11
check digit as an eighth digit. The DBMS uses the weightings 6, 5, 4, 3, 2 and 1 for
calculating the check digit. It uses 6 as the multiplier for the most significant (leftmost)
digit.
Show the calculation of the check digit for the Patient ID with the first six digits 786531.
Complete Patient ID [4]
(ii)
Name and describe two validation checks that the DBMS could carry out on each
primary key value that a user keys in for a Patient ID.
1
Validation check
Description
2
Validation check
Description
[4]
© UCLES 2017
9608/11/O/N/17
5
4
www.dynamicpapers.com
(a) The diagram shows the components and buses found inside a typical Personal Computer
(PC).
General purpose
registers
A
D
Arithmetic Logic
Unit (ALU)
E
F
B
C
Some components and buses only have labels A to F to identify them.
For each label, choose the appropriate title from the following list. The title for label D is
already given.
•
•
•
•
•
•
Control bus
System clock
Data bus
Control unit
Main memory
Secondary storage
A
B
C
D
Address bus
E
F
[5]
© UCLES 2017
9608/11/O/N/17
[Turn over
6
www.dynamicpapers.com
(b) The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC), and an Index Register (IX).
Instruction
Op code
(mnemonic)
Operand
Explanation
Op code
(binary)
LDM
#n
1100 0001
Immediate addressing. Load number n to ACC.
LDD
<address>
1100 0010
Direct addressing. Load the contents of the given
address to ACC.
LDV
#n
1100 0011
Relative addressing. Move to the address n locations
from the address of the current instruction. Load the
contents of this address to ACC.
STO
<address>
1100 0100
Store the contents of ACC at the given address.
DEC
1100 0101
Decrement the contents of ACC.
OUTCH
1100 0111
Output the character corresponding to the ASCII
character code in ACC.
JNE
<address>
1110 0110
Following a compare instruction, jump to <address> if
the compare was False.
JMP
<address>
1110 0011
(Unconditionally) jump to the given address.
CMP
#n
1110 0100
Compare the contents of ACC with number n.
© UCLES 2017
9608/11/O/N/17
www.dynamicpapers.com
7
Complete the trace table for the following assembly language program.
Label
StartProg:
CarryOn:
Instruction
LDV
#CountDown
CMP
Num1
JNE
CarryOn
JMP
Finish
OUTCH
LDD
ASCII code table (selected codes only)
<Space>
3
B
C
X
32
51
66
67
88
CountDown
DEC
Finish:
STO
CountDown
JMP
StartProg
LDM
#88
OUTCH
END
CountDown:
15
32
51
67
Num1:
32
Trace table:
ACC
CountDown
OUTPUT
15
67
C
15
[5]
© UCLES 2017
9608/11/O/N/17
[Turn over
8
www.dynamicpapers.com
(c) The program given in part (b) is to be translated using a two-pass assembler.
The program has been copied here for you. The program now starts with a directive which
tells the assembler to load the first instruction of the program to address 100.
Label
StartProg:
CarryOn:
ORG
#0100
LDV
#CountDown
CMP
Num1
JNE
CarryOn
JMP
Finish
OUTCH
LDD
CountDown
DEC
Finish:
STO
CountDown
JMP
StartProg
LDM
#88
OUTCH
END
CountDown:
15
32
51
67
Num1:
© UCLES 2017
32
9608/11/O/N/17
www.dynamicpapers.com
9
On the first pass of the two-pass process, the assembler adds entries to a symbol table.
The following symbol table shows the first eleven entries, part way through the first pass.
The circular labels show the order in which the assembler made the entries to the symbol
table.
Symbol table
Symbolic address
Absolute address
2
StartProg
1
100
CountDown
3
UNKNOWN
4
Num1
5
UNKNOWN
6
CarryOn
7
UNKNOWN
8
Finish
9
UNKNOWN
10
104
11
Explain how the assembler made these entries to the symbol table.
[3]
(d) The assembler software must then complete the second pass building up the executable file.
(i)
Name the second table needed when the assembler software carries out the second
pass.
[1]
© UCLES 2017
9608/11/O/N/17
[Turn over
www.dynamicpapers.com
10
The following shows two of the program instructions in machine code.
Machine code
Instruction
Binary
Hexadecimal
OUTCH
1100 0111
C7
JNE CarryOn
A
B
Each of the numbers A and B represents the complete instruction in two bytes, one byte for
the op code and one byte for the operand.
(ii)
Use the following instruction set to write the numbers for A and B.
A
(binary)
B
(hexadecimal)
[3]
Instruction
Op code
(mnemonic)
Operand
Explanation
Op code
(binary)
LDM
#n
1100 0001
Immediate addressing. Load number n to ACC.
LDD
<address>
1100 0010
Direct addressing. Load the contents of the given
address to ACC.
LDV
#n
1100 0011
Relative addressing. Move to the address n locations
from the address of the current instruction. Load the
contents of this address to ACC.
STO
<address>
1100 0100
Store the contents of ACC at the given address.
DEC
1100 0101
Decrement the contents of ACC.
OUTCH
1100 0111
Output the character corresponding to the ASCII
character code in ACC.
JNE
<address>
1110 0110
Following a compare instruction, jump to <address> if
the compare was False.
JMP
<address>
1110 0011
(Unconditionally) jump to the given address.
CMP
#n
1110 0100
Compare the contents of ACC with number n.
© UCLES 2017
9608/11/O/N/17
11
5
www.dynamicpapers.com
A Personal Computer (PC) has a number of input and output devices.
(a) (i)
Name three components of a speaker.
1
2
3
[3]
(ii)
Explain the basic internal operation of a speaker.
[4]
(b) (i)
The user is considering the purchase of a removable device for secondary storage.
Name one suitable device.
[1]
(ii)
Describe two possible uses for this device on a home Personal Computer (PC).
1
2
[2]
© UCLES 2017
9608/11/O/N/17
[Turn over
12
6
www.dynamicpapers.com
Raj has joined a software company as a trainee programmer. He was given the company’s Code
of Conduct document during his induction training. The handbook has a section headed ‘Ethical
Behaviour’.
(a) Describe what is meant by ethics.
[2]
(b) Raj is assigned to work as a new member of a development team.
In his first week, Raj feels uncomfortable working with one of his colleagues. He is unfamiliar
with the programming language used by the team. Next week, he will be working on the site
of one of the company’s clients with a colleague. Raj is very nervous about working in an
unfamiliar workplace.
Raj has a review with his manager after his first three weeks.
The Code of Conduct document was produced by the Human Resources section. It closely
follows the ACM/IEEE Software Engineering Code of Ethics that uses these eight key
principles:
Public
Client and Employer
Product
Judgement
Management
Profession
Colleagues
Self
There are issues Raj will want to raise with his manager.
•
•
•
Describe two of these issues.
Circle the key ACM/IEEE principle this comes under.
Suggest what action should be taken to demonstrate ethical behaviour.
Issue 1
Description
ACM/IEEE principle (Circle one only)
Public
Client and Employer
Product
Judgement
Management
Profession
Colleagues
Self
Possible action
© UCLES 2017
9608/11/O/N/17
13
www.dynamicpapers.com
Issue 2
Description
ACM/IEEE principle (Circle one only)
Public
Client and Employer
Product
Judgement
Management
Profession
Colleagues
Self
Possible action
[6]
Question 7 begins on the next page.
© UCLES 2017
9608/11/O/N/17
[Turn over
14
7
www.dynamicpapers.com
A clinic is staffed by several doctors. The clinic serves thousands of patients. Each day and at any
one time, there is only one doctor in the clinic available for appointments.
The clinic stores patient, doctor and appointment data in a relational database.
(a) (i)
Underline the primary key for each table in the following suggested table designs.
PATIENT(PatientID, PatientName, Address, Gender)
DOCTOR(DoctorID, Gender, Qualification)
APPOINTMENT(AppointmentDate, AppointmentTime, DoctorID, PatientID)
(ii)
[2]
Complete the following entity-relationship (E-R) diagram for this design.
[2]
(b) The doctors are concerned that many patients make appointments but do not attend them.
Describe the changes to the table designs that could be made to store this information.
[2]
© UCLES 2017
9608/11/O/N/17
www.dynamicpapers.com
15
(c) The doctors are about to set up a new clinic in the neighbouring village, SITE-B.
The original location is identified as SITE-A.
A new table is designed to store the ID of the doctor who is able to work at each site.
DOCTOR-AVAILABILITY(DoctorID, Site)
Five entries stored in the table are:
DoctorID
098
SITE-A
117
SITE-B
074
098
033
(i)
Site
SITE-A
SITE-B
SITE-B
State what this data shows about the availability of the doctor with the ID of 098.
[1]
(ii)
Opening a new clinic in the neighbouring village will not require any additional table for
storing appointments. It will need a change to the existing appointment table design.
Show the revised APPOINTMENT table.
APPOINTMENT(
) [1]
(d) The doctor with the ID of 117 has recently been allocated a new DoctorID of 017.
(i)
Write an SQL script to update this doctor’s record in the database.
UPDATE
SET
WHERE
[3]
(ii)
Describe why this update could cause problems with the existing data stored.
[2]
© UCLES 2017
9608/11/O/N/17
[Turn over
16
www.dynamicpapers.com
(e) Write an SQL script to display the date and time of all appointments made by the patient with
the PatientID of 556.
[3]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local
Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
© UCLES 2017
9608/11/O/N/17