A'Level Past Exam Papers
A'Level Past Exam Papers
Contents
COMPUTING PAPER 1 9195/1 NOVEMBER 2013 ............................................................................ 2
COMPUTING PAPER 1 9195/1 NOVEMBER 2014 ............................................................................ 9
COMPUTING PAPER 1 9195/1 NOVEMBER 2015 .......................................................................... 17
COMPUTING PAPER 2 9195/2 NOVEMBER 2015 .......................................................................... 25
COMPUTING PAPER 1 9195/1 NOVEMBER 2016 .......................................................................... 32
COMPUTING PAPER 2 9195/2 NOVEMBER 2016 ................................................................. 39
COMPUTING PAPER 1 9195/1 NOVEMBER 2017 .......................................................................... 47
COMPUTER SCIENCE 9195/2 NOVEMBER 2017 .............................................................................. 53
COMPUTER SCIENCE 6023/1 NOVEMBER 2018 .............................................................................. 61
COMPUTER SCIENCE 6023/2 2018 .................................................................................................. 70
COMPUTER SCIENCE PAPER 1 6023/1 NOVEMBER 2019............................................................... 84
COMPUTER SCIENCE PAPER 2 6023/2 NOVEMBER 2019............................................................... 91
SPECIMEN PAPER 2 6023/2 ................................................................................................................. 102
SPECIMEN PAPER 2 9195 .................................................................................................................... 119
1. (a) State one difference between Random Access Memory (RAM) and Read Only
Memory (ROM). [1]
RAM ROM
.RAM is volatile ROM is non-volatile
Data can be edited/changes Data cannot be edited
Data can be deleted Data cannot be deleted
Working area Non-working area
ii) Explain why the software is stored in ROM has some of the characteristics
of RAM. [2]
Needs to be random access or access to data would be slow
To allow upgrading of software
2. (a) Give any five points that need to be considered when a system analyst
produces a feasibility study, [5]
Is solution technically possible
Is solution economic to produce
Is the solution economic to run
What will be the social implications of change
Is the skill level in the available workforce high enough/ training
requirements
Is the solution legal
What will be the effects on the customer
Time constrains
(b) Describe what is involved in the analysis stage of the systems development
life cycle. [6]
Information collection
3. (a) Computer system controls an automated teller machine (ATM). For each of
the following, state one device that could be used in the ATM and explain its
function:
i) Input
Keyboard/magnetic stripe reader/chip reader/touch screen
Input pin or amount or other request/cardholder details.
ii) Output
Screen/printer
Output results of request/or hard copy for customer to take away.
iii) storage
hard drive/tape
to store customer request for statements/ store transaction.[6]
(b) The operating system used by computer controlling the ATM must work in
both batch and real- time mode‟
i) State what is meant by batch operating system and explain why it would
be necessary. [3]
Data is collected over a period of time and processed periodically
Requests for statements/data about transaction
Saved for later input to mainframe/ during off period
Data is collected in batches/groups for later use/processing
ii) State what is meant by real-time operating system and explain why it
would be necessary. [3]
Data must be processed immediately
Request for money must be accompanied by processing to establish
identity/ sufficient funds
Must be one in real time or lose customers
Data is quickly updated.
b) State any four different programs that you would expect to be in the integrated
software package and explain the use of each program. [8]
Word processor – to produce letters for sending to customers and
suppliers
Desktop publisher – to produce posters and brochures to advertise the
company‟s products
(b) Explain the need for translator programs in a computer system. [2]
Code produced by programmer not understandable by computer/
computers require code in binary form hence need for translator program.
Translator changes HLL/LLL to binary form /source code into object code
Provide error diagnostic
(c) When a programmer runs a program, the program may fail to run successfully
because there are errors in the code.
Describe three types of errors that may be present giving an example of each.
[9]
Syntax error/ error in the language or rules of the program e.g. Prant
instead of Print
Logic error/error that allows the program to run but gives wrong result
e.g. a jump to the wrong instruction/adding instead of subtracting
Runtime/execution e.g. arithmetic error/ request to carry out
inappropriate or impossible arithmetic e.g. division by zero.
6. (a) Draw a diagram of linked list to show the codes following examination papers
when they are stored in numerical order.
START
(b) (i) Explain what is meant by LIFO and FIFO data structures. [2]
LIFO – last data item to be inserted into the structure wil be the first tobe
used
FIFO – first data item to be inserted into the structure wil be the first to
used.
(i) Give one advantage and one disadvantage of using a linked list
structure to store a queue rather than using an array structure. [2]
Advantage
No maximum size of list
Does not tie up large amounts of memory unnecessarily
Allows use of multiple index pointers
Disadvantage
Reading from/writing to the structure can be a lengthy process
There is unnecessary overheads due to pa
(ii) Explain why a linked list is a more sensible structure than an array for
storing a stack. [3]
No maximum size of stack
Linked list and stack are both dynamic data structures which change
size during execution.
Reading and writing can be done on both ends.
If the level reaches H then the input valve is shut off until the level falls below
H again. IF the level falls below L then the output valve is shut off until the
level rises above L again. If the level falls below L for more than 1 hour the
system sends an alarm signal to the operation. Using the variables W, H, L, I,
O produce an algorithm to control the water level in the reservoir. [9]
(b) The alarm signal together with all the other valves from the system is sent to a
central control room. Al the water supplies in the city are controlled from this
central room by a single operator.
Explain the importance to the operator of good interface design, stating any
features which should be considered, [5]
Shows the importance of some of the information being received
Makes operation of the machine easier
Minimized operational errors
Enhanced sped in the operation of the machine
Features
Use of colour/layout
Use of flashing/bold/video
Use of graphics/sound
8. (a) List the input, processing, output and storage for each of these applications
i) email [4]
Processing
processing done in the user‟s computer and the computer of the
company that provides access to the internet/[IPS]
encoding of data
preparing of text for transmission
Input
details about the account holder e.g. email address, password through
the keyboard, voice recognition devices, touch screens and mouse
Output
through the monitor/screen if its soft copy and printer if need of hard
copy, voice output
message/letter/attachment
Storage
hard drive and hard disk at the firm which keeps your emails for you
until you delete them
mail box
ii) weather forecasting [4]
Processing
involve the computer applying rules to information about the weather
to work out what the weather should be like later
predicting the weather
weather simulation
using mathematical models
Input
information about weather conditions at the moment which is
probably sent automatically from weather station to the system by
such things as electronic thermometers/sensors/wind speed/barometer
Output
consists of maps to show what the weather will be like, probably
drawn by some form of plotting/graphs/simulated movement of
winds/cloud/on screen/printed output
Storage
a very large hard disk because weather forecasting uses a lot of data
(b) For each one in (a), say what sort of communication device is necessary, if
any. [5]
Email
modem
wireless adaptors
network cables
router
satellite
Weather forecasting
network cables
satellite system
router
wireless adaptor
Computer games
network cables
satellite system
router
wireless adaptor
speakers
joystick
keyboard
mouse
1. Transmission of data over a wide area network may be out by circuit or packet
switching.
a) Explain the difference between circuit switching and packet switching. [2]
Circuit switching
Dedication communication channel is established
The path is dedicated for the duration of the call
Make use of telephone lines
Packet switching
Divides the message into packets which may take different routes in transmission
Packets are reassembled at the receiving end
b) Give any three advantages of packet switching compared over circuit switching.
[3]
Packet switching charges during the use of network only
A damaged packet can be re-sent
Cost depend only on number of packets sent and not on distance
Data can be transmitted at local rates
Less likely to be affected by network failure
Multiple routes available to transmit data packets
Better security/data is likely to be intercepted
Network not tied up/congested
All routes available
c) State any three items that will be transmitted with a data packet in addition to
the data itself. [3]
Destination address
A packet sequence number so that the whole message can be correctly
reassembled
A checksum for error checking
Source address
2. (a) State any one function of a modem. [1]
Modulates and demodulates signals
Converts digital signals to analogue form or vice versa
Digital to analogue for transmission along telephone lines
Connects a computer to the telephone network/internet
(b) State one reason why the use of ISDN telephone system eliminates the use of a
modem when computing is connected to a wide Area Network. [1]
ISDN (integrated services digital network) transmits digital data hence no need to
convert signals.
3. (a) Explain the difference between serial and parallel transmission [2]
Serial transmission
Data sent one bit at a time over a single communication channel
Used for long distance
Parallel transmission
Bits are sent simultaneous along separate data lines/ at the same time
Used for short distances e.g. from computer to printer
(b) Outline the circumstances under which it would be appropriate to use parallel
transmission. [2]
When transmitting data over short distances
Transmission of data between components within the computer system.
Where transmission rates will be high
ii) Deadlock or deadly embrace occurs when two users are attempting to update
two related records in the same table. Neither of the two users‟ proceeds as
each will wait for a resource which is locked by another user.
Serial – Transaction files are recorded in the order in which events takes
place
Sequential – Are efficient where hit rate is very high, payrolls have high
hit rate
Random – are used where extremely fast access of individual records is
required like in online booking system.
c) When calculating the address of a record in a random file system using a
hashing algorithm, synonymous addresses are bound to occur where two
records generate the same address.
i) Give any two properties of a good algorithm. [2]
It can generate any of the available address on the file
It is fast to calculate
It minimise collisions
ii) Explain any two ways in which synonymous addresses can be resolved.
[2]
Place the record that caused collision into the next available free space
(b) A college uses a range of software packages from different suppliers. The college
is considering changing its software from one supplier to a common user
interface.
9. (a) A job control language is used to control how jobs are to be run in batch
processing.
List any three pieces of information which might be specified in the job control
script for a particular job. [3]
Who owns the job?
Job priority
The maximum processor time to allow the job
The maximum lines to be printed
The name of data files used
Prepared by Gogo vaMishy (0772 588 949)
A’ level past exam papers
Syntax and semantics – Parsing the lexical string to check that it is grammatical
correct using BNF notation and syntax diagram. Symbol table is completed
Code generation and optimisation - Producing machine code and storing it as an
object file, Allocates memory locations to variables and constants. Optimizes the
machine code to reduce the use of memory or speed it
(b) Explain the steps which are followed when creating a binary tree. [4]
i) 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 [2]
0.1101 x 23 = 0110.1
= 6.5
ii) 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 [2]
(d) Give any two advantages of normalising in floating point binary. [2]
Maximum precision for a given number of bits
Only one representation for each number.
(b) Explain how the use of e-commerce could be beneficial to an organisation. [3]
Huge saving on overheads; no costly warehouse space, rent, heating or employs
facilities.
It is a variable market research tool.
The virtual shop can stock anything.
1. (a) Outline four reasons that have led to the widespread use of electronic mail
in business, industry and education. [4]
Emails are fast in communication. An email can be sent to an email
subscriber in any part of the world in a matter of seconds.
Messages can be sent across the world for the price of a local phone call
Files of different formats can be attached to an email.
You can use an address book to send the same message to several different
people
(b) Discuss two security problems that have arisen with electronic mail
system and indicate what steps can be taken to overcome them. [4]
Phishing
Phishing is a fraudulent operation involving the use of emails
The creator sends out a legitimate looking email hoping to gather
personal and financial information from the recipient of the email
Countermeasure
Don't open e-mails from senders you are not familiar with.
Don't ever click on a link inside of an e-mail unless you know exactly
where it is going.
To layer that protection, if you get an e-mail from a source you are
unsure of, navigate to the provided link manually by entering the
legitimate website address into your browser.
Spam
Spam is electronic junk mail and is a type of advertising from a
company sent out to a target mailing list
It is harmless but can clog up networks and slow them down
Countermeasure
It is often necessary to put a legitimate email address into a contact list
to ensure wanted emails are not filtered out by mistake
Virus
Viruses are malicious computer programs that are often sent as an
email attachment or a download with the intent of infecting your
computer, as well as the computers of everyone in your contact list.
Countermeasure
Install antivirus and keep it up to date
Scan all attachment
Delete email from sender you do not know
2. Discuss the effects of computerisation of a bank from the user‟s point of view. [4]
No need to stand in queues
Do all their transactions in the comfort of their homes
No need to carry around hard cash
It doesn‟t offer face to face service which might make it difficult to sort out
problems
4. The introduction of e-learning has brought about change in the educational field.
a) Define the term e-learning. [1]
The use of computers or electronic devices in learning and teaching
b) State two advantages of using e-learning to students. [2]
Learners can learn at times that are more suitable to them
Learners have more control over the pace of their learning
Easier to repeat parts learners have not understood
No need to have more textbooks (hardcopies)
5. (a) List three duties carried out by the database administrator in a database
management system. [3]
Setting up the database together with the programmers.
Control, manage and maintain the database.
Define, implement and control database storage.
Ensure that policies and procedures are established.
Define the strategy of backup storage and recovering from system
breakdown
Supervise amendments to the database.
Ensures that the data is secure from unauthorised access
To standardize the use of database and associated software
(b) Describe the following record types and give an advantage of using the
record type:
i) Fixed length record
Records with fixed number of fields and number of characters in
any field are fixed
Advantages
Records can be updated in situ
Easy to estimate size of file
Easy processing of files
ii) Variable length record
Records in which number of characters in any field varies between
records and records have a varying number of fields
Advantages
(b) Distinguish between the following file organisation methods, outlining the
most suitable application for each:
i) serial and direct access [4]
Serial Direct
This is whereby records are This is whereby records are not
stored one after another as in any order but stored and
they occur, without any accessed according to their disk
definite order as on magnetic
address or relative position,
tapes. Data is not stored in
any particular sequence. calculated from the primary key
Suitable for temporary/ of the record
transaction file Airline booking system
File with high volatility
(c) With reference to the primary key, secondary key and composite key,
explain how access to records can be established through the use of these
keys. [3]
Primary Key
It is a candidate key that is used to identify a unique (one)
record from a relation.
Secondary Key
A field used to identify more than one record at a time, e.g.
records of same department
Composite Key
is a key that contains more than one attribute, Used to uniquely
identify a single record.
7. A clothing shop offers credit facilities to its customers. Its computer system
supports online enquiry during the day and batch processing at night.
List any three tasks which the shop‟s computer might perform in batch
processing. [3]
Processing monthly statements for customer
Processing the payroll
Updating the master file using the transaction file
8. (a) Express the following decimal numbers in twos compliment binary using
8 bits:
i) 127 0111 1111
ii) -27 1110 0101 [2]
(b) Explain using the above example, how hexadecimal can be used as a
shorthand for expressing bytes that consist of 8 bits. [3]
Divide the bits into nibbles
Change each nibble into decimal equivalent
E.g. 0111 1111
7 F
0111 11112 = 7Fhex
10111100102 = 13628
ii) Hexadecimal
0010 1111 0010
2 F 2
1011110 0102 = 2F2hex [2]
(d) A sort program inputs an unordered list of names and stores them in
memory in the form of a binary tree. Fig 8.1 represents this data
structure with the first six names entered.
John
Joanne
Thomas
Brendon
Barton
Fig 8.1
iii) Copy the diagram and add notes for Susan, Winnet, Anna and
Josephine on the list. [7]
John
Joanne
Thomas
Brendon Josephine
Susan winner
Barton
(e) Music is often recorded digitally. Write any four advantages of this
method of representing sound. [4]
(b) Continuous use of computer by data capture clerks can cause some health
problems for operators.
i) Give any two healthy problems that can arise due to continuous use of
computers.
Back and neck problems/strain
Repetitive strain injury (RSI)
Eyestrain
Headache
Ozone irritation caused by laser printers in an office [2]
ii) List any tow precautions that may be used to prevent the above risks.
Back and neck problems/strain
Use adjustable chairs- correct posture
Use foot rests to reduce posture problems
Tilted screens- ensure neck is at correct angle
10. (a) Describe how each of the following methods is used to transfer data into a
computer and in each case give an appropriate application.
i) MICR (Magnetic Ink Character Recognition), [2]
The bank's code number and cheque number are printed on the
cheques with a special type of ink that contains particles of magnetic
material that are machine readable. This reading process is called
Magnetic Ink Character Recognition MICR
Used to process cheques in banking operation
ii) OCR (Optical Character Recognition)
Optical Character recognition is a software that takes scanned text
and converts it into a computer readable form
Application
Processing of passports and Identity cards
OCR is used when scanning documents to modify them using suitable
software
(b) Use of magnetic tape is still widespread although large disk drives are
now available for computer systems. Describe two distinct uses of
magnetic tape. [4]
Single processor
Single bus for data and instructions
Single memory for both data and instructions
Sequential/serial processing of instructions.
(ii) Explain what the accumulator holds and how the contents change
during the fetch-execution cycle.
SECTION A
Clicking a button
Closing a window
Moving mouse pointer
Resizing form
(b) List any five data types in Visual Basic
Integer
Double
Single
Character
String
(c) Explain any two differences between a constant and a variable
Constant Variable
It maintains a single value throughout Its value may change in program
the program‟s execution. execution.
Declared using CONST statement Declared using DIM statement
Private Fact-click()
txtFact = 1
For i = 1 to txtNum
txtFact = txtxFact + i
End Sub [4]
Errors
Line 1 missing word sub and that hyphen must be an underscore
Line 2 must be txtFact.Text = 1
Line 3 must be For I = 1 to txtNum.Text
Line 4 : Must be txtFact.Text = txtFact*i
Missing lines
Declarations after the first line. Number must be declared
Next before last line.
4. DP Repairs offer repair series at a rate of $20 per hour for labour. Costs of supplies are subject to
15% sales tax.
(a) Design a Visual Basic form which presents the bill for the situation. The customer‟s name,
labour hours and the cost of supplies are to be captured using textboxes. Clicking of a
command should trigger the display of the client name and the costs (labour cost, supplies‟
cost and total cost). Names for controls are required. The display should be a list box. [8]
Object Name
Text Box 1 txtcustname
Text Box 2 txtlabourhours
Text Box 3 txtcostofsupplies
List Box lstinfo
Button 1 btnRun
(b) Using the situation given in (a) above, write a code that will calculate the total cost, labour
cost, supplies cost and display the client name, labour cost, supplies cost and the total cost.
[10]
labour_cost = labour_hours * 20
Supplier_cost = (15 / 100 * Supplier_cost) + Supplier_cost
Total_cost = labour_cost + Supplier_cost
lstinfo.Items.Add("Customer name" & vbTab & "Labour cost" & vbTab & "supplies
cost" & vbTab & "Total cost")
lstinfo.Items.Add(name & vbTab & " " & labour_cost & vbTab & "
" & Supplier_cost & vbTab & " " & Total_cost)
End Sub
End Class
5. Write a Visual Basic code which will classify any mark captured in a textbox named txtMark
according to the following grades:
A - 70 – 100
B - 60 – 69
C - 50 – 59
D - 40 – 49
E - 30 – 39
U - 0 – 29
The grades should be displayed on a label named display. Make use of CASE
STATEMENTS. [8]
End Select
End Sub
End Class
SECTION B
6. (a) Explain the four basic aspects of the design stage in system analysis [4]
Input design.
Output design.
File design.
Program design.
(b) Give three reasons why maintenance of a system is necessary. [3]
To add new features that may be seen necessary to include in the system.
To improve system response time.
To correct some errors that may have been encountered so as to ensure a
smooth running of the system.
(c) You have been hired by an organisation to develop a Management Information
System,
(i) Illustrate the approach you would take to ensure that you develop a system
that meets the client‟s specifications.
Problem identification
Fact Finding
Feasibility study
Analysis
Design
Developing and testing
Documentation and user-training
Implementation
Evaluation
Maintenance [8]
(ii) Give an explanation for each of the development of the components in the
approach to the development of c (i) Management Information System [8]
Problem identification -
Feasibility study - it is preliminary investigation conducted to
determine if there is need for a new system or modification of the
existing one.
Data collection – these are fact finding methods that can be used to
collect data about the system and they include: interviews, record
inspection, questionnaires, observations…
Analysis -
Design – creating the system and fully test it
Developing and testing
Implementation -
Evaluation -
Maintenance
7. (a) A mail order company has a multi-user centralised database to allow employees to
access orders and deal with customer enquiries as they come in to customer service
department.
(i) Explain why different staff will have passwords allowing them different
levels of access to the data stored. [2]
Because different staff will need to access only the tables they need to
perform their tasks.
(ii) Give two other reasons why passwords would be used for this type of system.
[2]
To avoid unauthorised access
To avoid identity theft
(b) A record within the main stock file is locked whenever one person is making changes
to it.
(i) Explain the term „locked‟. [1]
Locked means it restricted other users to alter the record when one person
opened it
(ii) Explain why it is necessary in this case to lock records. [2]
It necessary because it is a multiuser system and multiple users can open a
single table at the same time
(c) A stock master file is updated by a transaction file using sequential file access. The
purpose of the stock master file is to ensure that the levels of stock will met demand.
(i) Give four essential fields for the stock master file. [4]
Product id
Product supplier name and the product name
Quantity of a product
Price of each item
Bar code
Reorder level
Supplier ID
(ii) Give three essential fields for the transaction file. [3]
Product name
Quantity of products
Price of each item and the total price
The change given field and maybe the name the dates of transaction
(iii) Explain why the transaction file should be sorted and in what order, prior to
updating the master file [3]
To order transaction file records to same order of master file
records
Reduce time to update master file
No need for rewinding master file tape during update
(d) A student on work experience at Salary Service Bureau (SSB) was alone in the office.
The student logged into the computer system by guessing the administrator‟s user ID
and password. The student then accessed the company‟s pay roll file and changed the
gross pay of several employees.
(i) State the two offences the student committed.
Gaining unauthorised access to data or programs on a computer
Intentional unauthorised modifications of content of the computer
(ii) Explain any three methods of security the company could have used to
prevent the offences [8]
Encryption of data
Use of biometric security
Firewall
* /
v w - z
X Y
(a) Show the output if the tree is traversed using:
(i) Post order VW*XY-Z/+
(ii) In- order (V*W)+(X-(Y/Z))
(iii) Pre-order +*VW/-XYZ [12]
(b) (i) Show how the decimal numbers 13 and 32 would be represented as 8-
bit binary integers,
13 – 00001101
32 – 00100000
(ii) Given that the ASCII Code for the character 1 is 110001, show how
the test string „1332‟ would be held in a 4-byte word. [5]
Actual error = exact value – computed value. The exact value would be the value obtained
without any error
Relative errors.
Relative error = actual error / exact value
Therefore Relative error = (exact value – computed value)/exact value
(a) Explain why banks hold customer account information online. [2]
So that customer can do online banking
Customers can pay their credits online
Customers can use their cards on point of sale to pay for their goods
(b) (i) Outline any two possible threats to a computer system. [2]
Virus
Hackers
Natural disasters
(ii) Explain how to provide security to counter threats in b (i) [2]
Updated antivirus
Passwords and Encryption
Backups off the site
2. A rental club has computerised its accounts. Membership for the club is renewed
annually and each member is issued with a swipe card. When renting a car, the
client swipes on terminal at the reception of the club outlet and the members will be
required to settle their monthly bills by cheque.
a) Illustrate how the swipe card system collects and processes data relating to a
member‟s expenditure. [5]
receipt
member Reception
swipe
receipt/Invoice
Up-to-date file
Automatic calculations
No need for hard cash
3. (a) Suggest
i) The criteria that can be used in choosing a file organisation type. [4]
How the file is going to used
How many record are processed each time the file is updated
Whether individually records need to be quickly accessed
What type of medium is going to be used
ii) Two different ways in which the records in an indexed sequential file may
be accessed. [4]
Randomly when accessing the index
Sequentially when accessing the records
(b) Outline the purposes and the main steps in
i) Backups [3]
The purpose of the backup is to create a copy of data that can be
recovered in the event of a data loss due to hardware or software
failure, data corruption, malicious attack, or accidental deletion of
data
Steps
Identify the volume of useful data to be backed up and categorize file
system as files or folders
Choose the backup media
Back up your data
Check that it works
Store it safely of the site
ii) Archiving [3]
Data archiving is the process of moving data that is no longer actively
used to a separate storage device for long term retention for future
reference
Steps
Inventorying and determine which data must be archived
Assign a retention period schedule for each category
Develop archive policy
Proactive protection of the data archive‟s integrity
Choosing a data archive product
Teacher Student
Class Student
(c) Illustrate the relationship identified in b(i) and b(ii) using entity-relationship
diagrams [6]
5. (a) (i) Distinguish between static and dynamic data structure. [2]
Static data structure Dynamic data structure
(ii) Outline one benefit that would be gained from using a dynamic data
structure to implement a binary tree. [1]
Access time to an individual node is much quicker than by using a simple
serial search
(iii) An initially empty tree has the following items added in the order: melon,
peer, banana, orange.
Draw the binary tree after the four items have been added. [3]
melon
banana
peer
orange
128 64 32 16 8 4 2 1
1 0 1 0 1 1 0 1
128+32+8+4+1 =17310
2 7 5 3
(b) With the aid of a diagram, illustrate any three major activities of an operating
system with regard to memory management. [6]
(d) Evaluate any difficulty that a programmer must overcome in writing any
operating system for real time environment. [2]
The main difficulty is keeping the operating system within the fixed time
constraints of a real-time system
Real-time system has fixed time constraints on its operations of a processor and
flow of data. This means that the system will fail if some process takes too long to
complete. Therefore, programmers have to pay a lot of attention to optimization
and resource allocation.
9. (a) Outline the advantages of computer networks. [5]
Data can be pooled and therefore accessed by a wide range of users. This helps to
ensure integrity.
Hardware resources such as printers and scanners can be shared. This is a more
cost-effective solution than providing each user with his own set of peripheral
devices.
Software resources can be shared.
Security is centralised and so improved.
The network manager can control access by setting access rights and user
permission and auditing computer use.
Centrally located virus checking software can be used to check all files on the
network.
Backup procedures are easier to complete if centrally located and managed.
(b) Explain any three benefits of using fibre optic cable as transmission medium. [6]
It has less attenuation and therefore fewer repeaters are needed,
has very high bandwidth and cannot corrode (not affected by corrosion),
it is thin and therefore has less weight.
It allows very fast data transfer,
A network in which each computer serves as a relay point for directly sending
information to any other computer on the network.
No central device oversees a mesh network, and no set route is used to pass data
back and forth between computers.
X = 1 if (A is 1 and B is 1) OR (B is 1 or C is NOT 1)
A
a
AND
B b OR X
OR
C
NOT
b) Come up with the truth table for the logic statement in (a)
A B C NOT a b X
C
0 0 0 1 0 1 1
0 0 1 0 0 0 0
0 1 0 1 0 1 1
0 1 1 0 0 1 1
1 0 0 1 0 1 1
1 0 1 0 0 0 0
1 1 0 1 1 1 1
1 1 1 0 1 1 1
SECTION A
1. (a) Giving an example in each case, explain what is meant by the following types
of programing errors:
(i) Syntax [2]
A syntax error is whereby the programmers conflict with the
grammatical rules governing sentence construction and layout of
different programming languages.eg misspelling reserved words.
(ii) Logic [2]
(iii) Logical refers to an error in the sequencing of instructions, modules
and specifying wrong formulae that will produce undesirable results. -
For example, specifying a jump instruction to the wrong procedure or
instructing the computer to display result before any processing has
been done. - Logic errors cannot be detected by the computer. - The
user just finds wrong and unintended results of a process. - For
example: NetSalary = GrossSalary + Deductions + AidsLevy
(b) Discuss how procedures and the programing construct selection can be used to
Code a simple menu system for user. [2]
Procedures are used to code sub tasks of the program separately.
Construct selection is used to make a good choice of the procedure to
execute according to the choice of food made.
2. (a) The code below was proposed by a programmer
Total = 10
Repeat
Read K
If K > 2 Then
Total = Total + K
Else
K = K*k
Total = Total + K
End If
Print Total
Until K = 2
Print Total
End
Represent the output for this code using a trace table with the following input
string:
3, 5, 1, 2, 4, 0
K TOTAL
- 10
3 13
5 18 Total = 23
1 19
2 23
(b) Describe any three different methods that can be used by a programmer to
make a code understandable to someone who has to maintain it. [6]
Indenting – this is writing the code in a way that all the statements are not
in the same line but rather systematically away from the margin
Using comments – this is explaining what every piece of code you write is
going to mean to the system.
Using blank lines this creates space so that each statement can be read
easily
3. Construct a Visual Basic (VB) program to determine what flavour of ice-cream is
selected by a user. If a user has picked a flavour, display the flavour in a message
box, and if a user has not selected a flavour, use a message box to notify the user of
the error. The form below is an example of what the ice-cream flavour form might
look like. State clearly the names of controls used.
Ice-cream
Single scoop flavour
Chocolate Vanilla
3 3
6 Strawberry 6
3
6 Display Order
End Sub
End Class
Control Caption
Display order btndisplayorder
Exit btnexit
lstorders lstorders
Chocolate Rbtchocolate
Vanilla Rbtvanilla
Strawberry rbtstrawberry
4. Construct a diagram illustrating how a program passes through the three main phases of
compilation. [6]
Source
program
Lexical
Analysis
Syntax
Analysis
Code
Generation
Object
Program
5. Write a Visual Basic (VB) code to find the roots of an equation given the condition:
If b2 – 4ac > 0, then the equation has two real roots and b2 – 4ac = 0, then the equation
has one real root or else it has no real roots. [12]
End Sub
SECTION B
6. (a) A computer system controls an Automated Teller Machine (ATM) cash card.
Determine any one device, clearly stating its purpose that could be in the ATM
for the following functions.
(i) Input
Numeric Keypads - where customers can key in their personal
identification number (PIN), or an amount of money
(ii) Output
(b) The operating system used by a computer controlling the ATM must work in
two modes.
Batch processing
Real time transaction processing
(ii) Justify the answer in b(i) using real life situations in a bank. [4]
Batch processing –
Real time transaction processing – getting money from the ATM
(c) Suppose you are given the details of a small mail order catalogue system that
allows people to shop from home. When a customer receives the catalogue
and wants to buy something, the customer can telephone, fax or mail their
order to the company. The company gets the order and sends the goods and an
invoice. When the customer receives the goods with a delivery note, the
customer sends payment and receives a receipt for their payment.
Given, the above scenario, produce a data flow diagram (DFD) for the mail
order. [6]
Goods &
invoice
Payment
Customer
(d) An industrial cleaning company employs some of its workers at an hourly rate.
The company uses a computer to produce their payslips and pay cheques each
week. The payroll program updates the sequential payroll master file from a
validated transaction file which has previously been sorted into the correct
order. The payroll program retrieves personal data such as name, address and
rate of pay from the Employee Master file which has been indexed in
sequential file organisation.
Employee’s
working details
Key in data
Validate
Validated
Transaction
s
Sort
Validated
transactions
Sorted
Transaction
s
Employee New
Update
Master File Master File
Payslips
7. (a) A college keeps its student files on paper which is kept in filing cabinets. A
decision has been taken to computerise these files.
Justify any three measures that can be taken to ensure that stored information
remains confidential. [6]
Use access rights -
Use passwords2
Use biometric data to gain 468
(c) A sports club runs a number of sports teams. Each team is made up of a
number of members of the club and each member may play for more than one
team, each team has a number of coaches, but the coach‟s job is so time
consuming that each coach can only coach one team.
1 coaches
1
Member ID
ade up
ade up
Coach ID M Plays in
1
Team ID
ade up
(b) Explain how the binary value of 78 can be used to write down the equivalent
octal value with a minimum amount of calculation. [2]
Two‟s compliment used for both the mantissa and the exponent.
1 0 1 0 1 0 0 0 0 1 1 1
1.0101000 +7
4. (a) Give any two differences between dynamic and static data structures. [2]
(b) The following data items are to be entered into binary search tree in the
order given:
Harare
Berlin London
ii) If Madrid is being searched for in this binary tree, list the data
items which will have to be accessed. [1]
Harare, London, Paris, Madrid
Give the difference in the way in which the three main translators
Translate data. [6]
Interpreter
An interpreter translates high –level language into machine code one line at a
time and executes it. No object code is produced so the program has to be
interpreted each time it is to be run
Compiler
A compiler translates a complete program in high level language into object
code before it is executed
Assembler
An assembler is a program which translates an assembly code program into
machine code ready for the computer to execute it. Since each type of
computer has its own assembly language, it also has its own assembler
Lexical Analysis
Removes white space, blank lines and comments
Keywords , constants and identifiers are replaced by tokens
A symbol table is partial created
Some illegal identifiers are flagged out
Syntax Analysis
Parsing the lexical string to check that it is grammatical correct using
BNF notation and syntax diagram
Symbol table is completed
Code generation
Producing machine code and storing it as an object file,
Allocates memory locations to variables and constants
Optimizes the machine code to reduce the use of memory or speed it
Draw a diagram to show the steps for this program that generate an amended
copy of the master file. [6]
Update
Master file
(Day 3)
Son
10. Programmers prefer interpreters over compilers. Justify this statement. [7].
SECTION A
.
.
.
Procedure display-records (n)
Integer linemax
.
.
.
If (n < n-records) then
Display error message box (.)
End if
.
End procedure
These are variables that are defined within a procedure and are accessible
just within the procedure they are declared
(ii) Global variable [1]
They are public variables that can be accessed and used by any procedure
or function within the same program
(iv) parameter [1]
is data item being supplied to a function or procedure when it is called
(b) Identify the three terms in a (a) from the program fragment. [3]
2. Given that:
T(0) = 1
T(1) = 1
T(2) = 2
T(3) = T(2) * T(1) = 2
T(4) = T(3) * T(2) = 4
T(n) = T(n - 1) * T(n - 2)
Write a recursive faction in pseudocode that takes any number as input and displays the
value of T as output [6]
Function Time
If T = 0 and T = 1 Then
Return 1
Else
If T = 2 Then
Return 2
Else Return T(n-1) * T(n-2)
End If
End If
End Function
Letter &
(b) INPUT A, B
IF B = 0 THEN C = A
ELSE C = A/B
ENDIF
PRINT A, B
PRINT C
END
Produce an algorithm to control the fan/ the algorithm may be expressed in any
form. [6]
START
4. Given the following interface, interface, code a program that calculates and display the
roots of a quadratic equation. [10]
A txta
B txtb
txtc
C
ROOT 1
txtroot1
ROOT 2 Txtroot2
btncompute
Public Class Form1
Dim A, B, C As Integer
Dim ROOT_1, ROOT_2 As Integer
Dim numroot As Integer
Dim det As Double
det = (B ^ 2) - (4 * A * C)
ROOT_1 = (-B + Math.Sqrt(det)) / (2 * A)
ROOT_2 = (-B - Math.Sqrt(det)) / (2 * A)
txtroot1.Text = ROOT_1
txtroot2.Text = ROOT_2
End Sub
5. Create a Visual Basic program using the SELECT CASE that display a message on a
message box depending on the day temperature input, through a textbox using the
following temperature ranges:
End Select
End Sub
End Class
SECTION B
Static data structure does not change in size while the program is
running e.g. an array. Once you declare the size of an array, it cannot be
change
34 54 87 90 101
(ii) 88 [5]
Staff Student
shool
(c) (i) Illustrate three major challenges of database management systems [3]
If the computer breaks down, you may not be able to access the
data.
(ii) Prescribe solutions for any two of the challenges in (i). [2]
Use backups
Use passwords
(a) Analyse any three factors the analyst should consider when designing
the HCI. [6]
Colour – colour can be used as an indicator of the data being
highlighted. For example, red is often as a warning colour and
green to signify that there is no problem.
Layout – the more important information should be positioned on
the screen where the user will read. The information must be read
from left to right. Maintain a similar layout across software which
is part of a software suite, e.g. common commands should be
placed in the same screen locations in all the software that controls
a chemical factory, so that users get used to the layout of the
interface.
Content – the content of the information presented is important.
(b) Modularity has become a very popular programming concept.
4 6 6
1 A
2 B 3 C 4
12 D E
5
23 G
F 5
2 7
6 H
The Program Evaluation and Review Technique chart (PERT) has been drawn
to allow critical path analysis of the problem
(i) Explain what the chart shows about the relationships between the
various tasks. [6]
(ii) Write the critical path and at least time required to complete the
project. [2]
ABDFH/AGH
Least time = 23 days
0100 1110
4 E
7810 = 4Ehex
7 8
0111 1000
2. A computer stores numbers in Floating Point Form, using 8 bits for the mantissa
and 8 bits for the exponent. Both the mantissa and the exponent are stored in two‟s
complement form.
01000000 00000010
Exponent = +2
Mantissa = 0.1000000 Move the decimal point 2 places to the right
= 010.0
=2
c) Explain why it is not possible to represent zero as a normalised floating number.
A normalised number must have the first two bits of the mantissa different. A negative
number start with 10 and a positive number start with 01. Zero is neither a positive
nor a negative number.
6. Presentation layer
The aim of protocols in this layer is to ensure that different devices using data
in different formats can communicate with each other, for example handling
conversation between ASCII and EBCDIC.
To translate, encrypt and compress data
It may also carry out encryption to ensure data security during transmission.
5. Session layer
The session layer is the user‟s interface into the network.
When a user requests a particular service from the network, the session layer
handles the dialogue.
The session layer is the network dialog controller.
It establishes, maintains, and synchronizes the interaction among
communicating systems.
4. Transport Layer
The transport layer is responsible for process-to-process delivery of the entire
message.
A process is an application program running on a host.
The transport layer ensures that the whole message arrives intact and in
order, overseeing both error control and flow control at the source-to-
destination level to ensure a high quality data transmission service for the
network.
3. Network layer
The network layer is responsible for the source-to-destination delivery of a
packet, possibly across multiple networks (links). Whereas the data link layer
oversees the delivery of the packet between two systems on the same network
(links), the network layer ensures that each packet gets from its point of origin
to its final destination.
If two systems are connected to the same link, there is usually no need for a
network layer. However, if the two systems are attached to different networks
(links) with connecting devices between the networks (links), there is often a
need for the network layer to accomplish source-to-destination delivery.
2. Data link layer
The physical data transmission media used in a network are subject to
interference which can corrupt data and this layer handles data transmission
errors
1. Physical layer
The physical layer coordinates the functions required to carry a bit stream
over a physical medium.
It deals with the mechanical and electrical specifications of the interface and
transmission medium.
It also defines the procedures and functions that physical devices and
interfaces have to perform for transmission to Occur.
It is concern with how the binary data is transmitted along the channel.
4. Describe how each of the following elements would be used in the OSI model.
a) Switch [2]
A switch is a device that is used at the Access or OSI layer 2 and utilises MAC
Address to determine the path through where frames are to be forwarded. It can be
used to connect multiple hosts (PCs) to the network.
b) Modem [2]
Dc A modem works at the Physical layer of the OSI model. It is a device that
modulates an analogue carrier signal to encode digital information, and also
demodulates such a carrier signal to decode the transmitted information
c) Bridge [2]
A bridge connects two LAN segments into one larger continuous LAN. Bridges
operate at the Data Link Layer of the OSI Model. They can distinguish between local
and remote data, so data traveling from one workstation to another in the same
segment do sent have to cross the bridge.
5. a) Explain how the width of the data bus and the system clock speed affect
performance of a computer. [3]
A wider data bus will allow more data to be sent at a time, and therefore the
processor will perform more efficiently.
A wider address bus will increase the number of memory addresses a computer
may use, e.g. an 8 bit bus will only allow a value between 0 and 255 to be
transmitted at a time.
A processor with a faster clock speed will perform faster, since more pulses will
be sent out in the same time frame.
The data and program processing Contains two separate areas for
that data are stored in the same commands or instructions and data
memory Use separate buses for data and
Has only one bus which is used for commands
both data transfers and instruction
fetches
(ii) Explain three buses used in the Von Neumann Model. [6]
control
bi-directional bus
its purpose is to transmit commands, timing and specific information between
system components
Address
one directional bus
used to transmit the address from processor to memory
Also used to address I/O ports during input/output operations
data
bi-directional bus
used to transmit data and instructions between system components
6. The next instruction to be carried out is LDA25, which loads the number 25 into the
accumulator.
a) With reference to special registers in the processor illustrates the stages of the
fetch and execute cycle when dealing with the instruction above.
[6]
The Fetch Stage:
Copy the address in the PC into the MAR
Increment PC
Load the instruction(LDA25) that is in the MAR into MDR
7. Schools in a district are connected to a WAN. It has been observed that files are
being manipulated and there is violation of confidential information.
Suggest measures that could be put in place to secure the WAN, giving reasons. [10]
All users should connect to WAN via a Virtual Private Network (VPN). A VPN
creates a secure tunnel that protects your data and allows al traffic, voice or data
to pass through a public WAN as it was on private LAN.
Install a trustworthy Firewall – A firewall is a hardware or software designed to
block unauthorised access to computers and networks
Cloud Computing security - applications and services are moved into the cloud.
Use strong passwords which are updated frequently
8. A student is trying different ways of designing the process of entering data into an
array.
Element 1
While Element < ArraySize Do
Input Number [Element]
Element Element + 1
Endwhile
a) In the following table, trace the effects of entering 24, 57,12. [8]
Number
ArraySize Element Element < ArraySize (1) (2) (3)
3
1
true
24
2
true
57
3
false
Logic error
(ii) The error can be corrected by changing one line. Write the
correct line of the pseudocode.
d) The student wants to increase the size of the array to 500. This is too large to
trace with the trace Table.
Show how one would check that the logic of the pseudocode is correct for 500
iterations.
Variable dump – see values of all variables at a particular place in the code
Break points – to stop execution at significant points
Black box testing- set results against expectations
Cross referencing – identifies errors caused by duplication of variable names
across procedures.
9. A database has been designed to store the data about sales persons and the products
they have sold.
The table Shopsales was the first attempt at designing the database.
Table: ShopSales
Number of
FirstName Shop ProductName products manufacture
Nick TX Television set 3 SKC
Refrigerator 2 WP
Digital camera 6 HKC
Sean BH Hair dryer 1 WG
Electric shaver 8 BG
John TX Television set 2 SKC
Mobile phone 8 ARC
Digital camera 4 HKC
Toaster 3 GK
a) Explain why the table is not in the First Normal Form(1NF) [1]
There are repeating groups in ProductName and Manufacturer columns
Using the data in the first attempt table, ShopSales, show how the data is now
stored in the revised table designs below.
FirstName Shop
Nick TX
Sean BH
John TX
(ii) Explain why the SalesProduct table is not in Second Normal Form
(2NF) [2]
2
A’ level past exam papers
1. (a) A system is monitored using a sensor. The sensors output binary values
corresponding to physical conditions as shown in the table.
The outputs of the sensors form the inputs to a logic circuit. The output from the circuit
X is 1, if any of the following conditions occur:
either oil pressure > = 3 bar and temperature > = 2000C or oil pressure < 3 bar and
rotation > 1000 rpm or temperature > = 2000C and rotation > 1000 rpm.
P a
T d
b
R
ii) Complete the truth table below for this system. [4]
Workspace
P T R X
a b c d
0 0 0 0 1 0 1 1
0 0 1 0 0 0 0 0
0 1 0 0 1 1 1 1
0 1 1 0 0 0 0 0
1 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0
1 1 0 1 0 1 1 1
1 1 1 1 0 0 1 1
(b) Using a spreadsheet application program, or otherwise simulate the following logic
circuit. Use only the following logic gates.
= NOT (. . .)
= AND (. . .)
= OR (. . .)
= XOR (. . .)
a
A
B f
Hint: Print the spreadsheet application program showing the formulas and the completed
truth table with all the intermediate results.
2. (a) Draw a well labelled diagrams showing the Main Memory, Central Processing Unit
(CPU) and the following registers Memory Address Registers (MAR), Memory Data
Register (MDR), Current Instruction Register (CIR) and Program Counter (PC) which
illustrates the Fetch Decode –Execute Cycle. [10]
Main memory
CPU
Control unit
ALU
PC
accumulator
CIR
MAR
MDR
(b) An alarm sounds when certain conditions occur in a nuclear reactor. The
output, X, of a logic circuit that drives the alarm must have a value of 1 if:
Either carbon dioxide pressure is too low and temperature < = 3000C or
water pressure > 10 bar and temperature > 3000C.
iii) Produce the truth Table for the alarm system [4]
Working Place
P T W X
P’ T’ W’ P’.T T’.W’
0 0 0 1 1 1 0 1 1
0 0 1 1 1 0 0 0 0
0 1 0 1 0 1 1 0 1
0 1 1 1 0 0 1 0 1
1 0 0 0 1 1 0 1 1
1 0 1 0 1 0 0 0 0
1 1 0 0 0 1 0 0 0
1 1 1 0 0 0 0 0 0
3. A student writes a program using a relaxed form of structured English. The student
uses identifiers that contain illegal characters such as the arithmetic operators to
name variables.
Assuming that the identifiers should have been made up of small alphabetic
characters and the maximum length of each identifier is 32 characters, write
functions that will validate variables on the following basis.
Dim i as integer
Dim flag As Boolean
Flag = True
For I = 1 to identif.length
If mid(identif, I, 1> “z” Or mid (identif, I, 1) < “a” Then
Flag = False
End If
Next i
Return flag
End Function
(b) Write code snippets that will accept an invalid identifier and perform the
following tasks:
(i) If it is too long truncate it and discard the right most part. [5]
Dim TestString as String
TestString = Console.Readline
If not lengthCheck(TestString) Then
TestString = left (TestString.32)
End If
Console.Writeline(TestString)
(ii) It then checks if there are any illegal characters and removes them.
[12]
Hint: You may use the function defined in part (a) to perform
checks by calling them.
False True
Condit
ion
False True
Condit
ion
Statement 3
Stop
Start
Statement 1
Statement 2
Statement 3
Stop
Statement 1
Statement 2
Statement 3
No
Conditi
on
Yes
Stop
(d) (i) Using a programming language of your choice, state any four
statements used with random access files. Give the purpose of each
statement. [8]
OPEN “MyFile.txt” FOR Random Read Lock As #1
Used to Open a file in random access mode and restrict access to
read only mode
(ii) Write any two statements which are common to both sequential
and random files. [2]
CLOSE #filenumber
OPEN “Filename” FOR mode AS #filenumber
4. (a) Write an algorithm of a program that accepts 50 numbers through the
keyboard and outputs the smallest, highest and average of all the
numbers entered.
Begin [10]
Smallest =2000
Highest = 0
Counter = 1
Total = 0
Average = 0
(b) Convert the above algorithm in (a) into a program. Use a text editor or
IDE environment to produce the code. [11]
Public Class Form1
End If
Next count
average = sum / 50
MsgBox("Average is:" & average)
MsgBox("Largest is:" & largest)
MsgBox("Smallest:" & smallest)
End Sub
End Class
Draw a binary search tree to show these values will be stored. [7]
F U
S
H X
Data
“J” “F” “H” “U” “S” “X” “T”
[1] [2] [3] [4] [5] [6] [7]
L
0 0
2 0 0 5 0 0
[1] [2] [3] [4] [5] [6] [7]
R
4 3 0 6 7 0
[1] [2] [3] [4] [5] [6] [7]
Item = “T”
Ptr = 1
While Dat[Ptr] <> Item Do
Print Data[Ptr]
If Data [Ptr] > Item The
Ptr = L [Ptr]
Else
Ptr = R [Ptr]
End If
End While
Write a pseudocode of a program that will output the square root of any
input number. The program must stop when the number input is zero (0 )
[7]
Write a program code that will use a loop to create the array given below and accept its
values.
9 12 15 17 4 5 8 9
Sub Main()
Dim Array(7) As Integer
Dim counter As Integer
For c = 0 To 7
Array(counter) = InputBox("enter number")
Console.ReadLine()
Next c
Console.ReadKey()
End Sub
End Module
SECTION C
5. (a) Using text editor or IDE environment, writ SQL statements to perform
the following;
(ii) Display the surname and first name fields only of students whose class
is 1A and fees paid is les than100. [6]
(iii) Delete a student record whose first name is Ralph from the student‟s
table. [3]
1
has
Branch code
M
Account type
balance
6. (a) Using text editor or IDE environment, writ SQL statements to perform
the following:
(ii) Create the tables “Student Details” and “Invoice” with the following
details: [13]
Students_details
Student_Details tables
CREATE TABLE Student_details
(student_name text (10),
Address text (50),
Student_ID text (5) PRIMARY KEY,
Class text (10),
);
Invoice table
CREATE TABLE Invoice
(Student_ID text (5) FOREIGN KEY,
Fees_amount currency,
Fees_paid currency,
Invoice_number text (5),
Fees_Balance currency,
Due_date Date/Time
);
(iii) Create a calculated field to calculate balance fees by subtracting paid
fees from fees amount using a query. The query should display all
fields from the Invoice table including the new calculated field. [6]
ORDERED BY Invoice_number
(b) A database design has three tables to store the classes that students attend.
1 M
Class Has Class_group
Class_group
M Have 1 Student
(ii) Write an SQL statement to display the StudentID and FirstName of all
students who are in the Tutor-group 3W. display the list in alphabetical
order of LastName. [4]
(iii) Write an SQL statement to display the LastName of all students who
attend the class whose classID is NO. 13. [4]
SELECT LastName
FROM Student, Class_group
WHERE ClassID = “No13”
AND Clas_group.StudentID = Student.StudentID
(b) Convert -60 and -90 into twos compliment, 8 bit binary numbers. [4]
2. Normalise the following numbers which are held with a 10 bit mantissa and 6 bit
exponent.
0.110101000 +2
Exponent = +2 - 3 = -1
1.001000000 +3
Exponent = +3 - 4 = -1
3. Given that the ASCII code for small letter a is 1100001, find the ASCII codes for
a) b = 1100010
b) c = 1100011
c) h = 1101000 [3]
4. With the aid of a diagram, explain how pipelining would improve the processing
speed of a computer. [6]
Instruction 2 Instruction 1
5. Using examples, explain the difference between direct and indirect addressing
[4]
Direct
The operand part is the actual address from which the data value is retrieved
e.g. LDA 10
Indirect
The operand h+
olds the address of te location that holds the value to be used.
e.g. LDA (10)
(d) (i) Design a truth table for a two input NOR gate. [2]
Inputs Outputs
A B X
0 0 1
0 1 0
1 0 0
= 1 0
1
B X
7. (a) State and explain any four reasons why privacy has become one of the key
topics in information security at the beginning of the 21st century. [7]
The internet is by no means a secure medium of communication, and yet
individuals choose to divulge personal details on it including financial
information such as credit card numbers. There are many ways in which
motivated individuals can gain access to insecure internet transactions.
An inevitable consequence of the trend for commercial companies and
public institutions to store personal records electronically is that one‟s
personal details are likely to be held on a number of databases. The level
of security applied to these databases varies widely, leaving open the
possibility that such personal details may be accessed by individuals who
should have no authority to do so.
The use of internet, and email facilities is widespread in places of work. An
increasing number of organisations use specialist applications to monitor
both web surfing activities and the email traffic of their employees.
Employees, on the other hand, may feel that their privacy is under threat
from such monitoring.
National security organisations and law enforcement agencies have
successfully argued that they are justified in monitoring electronic
communication, including email because they are used in the commission
of criminal acts and terrorist atrocities. While most people would support
measures taken against criminals and terrorist activity, there are many
individuals and groups who believe that the individual‟s right privacy is
being undermined by the technology sophistication and secretive nature of
such systems.
(b) Identify any three positive impacts of social media on „A‟ level students.
[3]
Collaborating with other A „level students
Share educational like e-books.
Receive and send assignments from/to their teachers
(c) Analyse the role of the physical layer in the OSI model. [5]
The physical layer coordinates the functions required to carry a bit stream
over a physical medium.
It deals with the mechanical and electrical specifications of the interface
and transmission medium.
It also defines the procedures and functions that physical devices and
interfaces have to perform for transmission to occur.
The physical layer is also concerned with the following:
Physical characteristics of interfaces and medium.
Representation of bits.
Data rate.
Synchronization of bits
Line configuration
Physical topology.
Transmission mode.
(d) Compare the OSI and TCP/IP models clearly showing any four
differences between these two models. [4]
a) Link six entities to their attributes from the above given scenario. [6]
# of name
Bus Pass address route
size Garage
Emp#
name
Stage #
name Driver
b) Draw an entity relationship diagram for the given scenario. [4]
addres
Stage route s
Towns
Tel #
mak
size
e route
av_p
Reg #
#pas ass
#
s
M 1 1 Passes
allocate route
Bus d
through
name
emp#
M
M
1
Is garaged 1 M
route Is
Stage route 1
allocated
Drivers
M
#
name
1 M
Tel # addres
Garage Passed s
through
addres 1
s
Is 1 Towns M
situated
name
(b) Using pseudocode, write down a recursive procedure for calculating the
factorial of a given number. [8]
Musawu
Muhacha Muzhanje
Mukute Mutsubvu
Muchecheni
Mushuma
Musasa
12. (a) List any three questions that may be in a marketing plan. [3]
Is there a market?
Is your product or service already being offered?
What will you be doing/offering that no-one else is?
What will you are doing better than anyone else is?
What sets you apart?
(b) State and describe any seven features of e-commerce technology which
make online shops better than the traditional methods. [7]
E-commerce enables the use of credits cards, debit cards, smart cards,
EFT via bank‟s website and other modes of electronic payment such as
Ecocash, Telecash, One Money and ZimSwitch Instant Payment
Interchange Technology (ZIPIT) to make non-cash payments.
E-commerce increases the reach of advertising of products and services of
business. It helps better marketing management of products and services.
Orders of the products can be generated anytime, anywhere without any
human intervention and this improves the business sales.
E-commerce provides various ways to provide pre-sales and post sales
assistance to provide belter services to customer.
Inventory management of products is automated and becomes very
efficient and easy to maintain.
E-commerce provides ways of faster, efficient and reliable communication
with customers and partners.
1. (a) Draw a logic network and truth table for the following logic problem:
C S
Control bus
Address bus
Data bus
2. (a) Illustrate with a diagram, the buses connecting the processor to memory. [5]
CPU
PC
MBR Data bus
MAIN MEMORY
CIR
SR
(b) With the aid of a diagram, show how pipelining can increase the throughput of
a computer. [5]
B
X
3. (a) A gas board has about 500 customers, each with a gas meter identified by a
unique code of 8 digits which include a check digit. The meter readings are
taken every 3 months. If a meter cannot be read, an estimated reading is
calculated.
(i) Write specifications of the data structure for the customer including the
following details; field name, type size and validation. [4]
Type Customer
Surname : String(20)
Firstname : String (15)
MeterCode : integer (8)
Metereading : String (6)
EndType
(ii) Write a program that accepts gas meter code, previous reading, current
reading and calculates the amount of gas used using a rate of $3 per
kg., calculates the amount due for payment and displays the
information on the screen. [14]
End Sub
name = txtName.Text
code = txtCode.Text
previous = txtPrevious.Text
current = txtCurent.Text
End Sub
End Class
(b) Write a program to grade marks for 12 courses for a college student. Use any
selection statement of your choice. The grades are as follows:
>= 75 Distinction
60 – 74 Merit
50 – 59 Pass
40 – 49 Supplementary
<=39 Fail [12]
ListBox1.Items.Add("SUBJECT" & " " & "MARK" & " " & "GRADE")
End Sub
Subject = txtSubject.Text
Mark = Val(txtMark.Text)
End Sub
End Class
(c) (i) Produce a trace table for the following algorithm using the number 8271. [4]
1 INPUT N
2 LET x = INT (N/10)
3 PRINT N – 10*x
4 IF x = 0 THEN STOP
5 N=x
6 GOTO 2
N x PRINT(N-10*x)
8271 827 1
827 82 7
82 8 2
8 0 8
(d) (i) Draw a flowchart of a program that reads a number of seconds from
the user and display the number of hours, minutes and seconds. For
example, if 10 000 is typed in, the program should display 2 hours, 46
minutes and 40 seconds. [6]
Start
Read # of seconds
Display
hours
Stop
(ii) Write a program and print the source code for the scenario in (i). [9]
seconds = Val(TextBox1.Text)
Label3.Text = hours
Label4.Text = minutes
Label5.Text = seconds
End Sub
End Class
X A OUTPUT
1 1 1, 1
2 4 2, 4
3 9 3, 9
Factorial of n = n * factorial of n – 1
If n > 1
Otherwise factorial of 0 = 1
This function is defined for all positive integers, i.e. whole numbers greater or
equal to zero.
n* factorial (n – 1) where x > 0
Factorial (n) =
1 where x = 0
Code a recursive function which returns the factorial, given a positive integer
argument. [9]
(c) A bank allows its customers to invest a minimum of $500 and accrue interest
using the interest rates below:
(i) Design and print an interface for the above scenario. [3]
amount_invested = TextBox1.Text
number_of_years = TextBox2.Text
End Sub
End Class
5. (a) In a library database, authors have written books about various subjects.
Different libraries in the system may carry those books. Authors have ID
number, name, and telephone number. Books have an ISDN and title. Subjects
have a subject name. Libraries have a library name.
Libraries
1 carry M Books
M Written M Authors
Tel#
various
Subject
ISDN
(i) Present all the information in the above invoice as a database in first Normal
Cust CustName Cell # Date City Code Qty Description Unit Sub
A/C Total
6065913 Ruth 0772 023 21/01/17 Bulawayo 60092317651 10 Chimombe milk 0.65 6.50
Chakanyuka 011 500ml
6065913 Ruth 0772 023 21/01/17 Bulawayo 60051621153 1 Mazoe Raspberry 2.39 2.39
Chakanyuka 011 2L
6065913 Ruth 0772 023 21/01/17 Bulawayo 60031005913 4 Bakers In Superior 0.90 3.60
Chakanyuka 011
(ii) Normalise your answer in (i) into second Normal Form showing all
relationships amongst the resulting tables. [12]
Cust A/C CustName Cell # City
6065913
60092317651 10 Chimombe milk 21/01/17 0.65 6.50
500ml
6065913
60051621153 1 Mazoe Raspberry 2L 21/01/17 2.39 2.39
6065913
60031005913 4 Bakers In Superior 21/01/17 0.90 3.60
The two tables are related using the Customer Account number
6. (a) There are persons at a school. Each person has a surname, first name,
Registration number and address. The person can be an employee or a student.
Each employee has a salary while each student has a class. The employee can
be a teacher or ancillary worker. Each teacher has an E.C. number and leave
days. Each ancillary worker is paid according to hours worked.
finame
Reg.#
addres
s
Employee salary
surname
Leave
days
Hours
Ancillary
Prepared by Gogo vaMishy (0772 588 949)worked
A’ level past exam papers
(b) A company realised that some of its customers are defaulting in payment. It is
decided to add an extra file for the debtors, which include the following fields:
Customer name, address, 30 days, 60 days, 90 days and 120 days.
The company wants to produce a mailing list for customers with 60 days debts
of at least $30, in descending order of debts.
(c) One of the debtors, Mr Mara has fully cleared his debt. The company wants to
remove his name from the list,
(d) Create a database and show how to connect the IDE language. [4]
SECTION A
A AND
B NO OR X
T
AN
D
C NO
T
A B C X
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
b) Draw a well-labelled diagram that illustrates how a processor, 1/0 devices and the
memory unit are linked by connections known as buses.
[6]
Address Bus
Data Bus
Control Bus
2. a) Produce a flowchart showing the 3 stages of the straight line sequencing of the fetch-
execute cycle, describing each stage. [8]
Start
yes
CPU
activated
Increment PC by 1
Decode instruction
Decode No No
Is it an add Jump
instructionYes instructi
? on?
yes
End
(b) Draw a diagram that illustrates the sequence of instructions that are
CPU
1
(c) Draw a well-labelled diagram showing the structure of Harvard computer architecture.
[4]
Harvard architecture
SECTION B
3. The following is an array named Exams that stores 5 examination marks. Index
positions are in square brackets below the array elements.
Exams
50 60 30 43 19
[0] [1] [2] [3] [4]
50
30 60
19 43
0
b) Assuming that the element 50 is completely deleted and removed from the tree structure
drawn in (a), draw the new binary tree structure after 50 has been removed. [2]
60
30
c) -Using the binary tree diagram drawn in (a) and the Exams array structure, complete the
19
table below to illustrate how a binary
43 tree can be implemented using an array.
Using Vb.net
(ii) declare a 2-dimensional array called STUDENTS that stores student names
using 4 rows and 3 columns. [4]
e) Write a program code that implements a linear search algorithm to find the value 19 from
the array Exams. If the value exists in the array, it displays the message “Value has been
Found”, otherwise it displays “Value does not exist”. Use a text editor to type the program
code. [17]
Module Module1
Sub Main()
Dim Exams As Integer() = New Integer(5) {11, 13, 15, 17, 19, 21}
Console.WriteLine("")
Console.WriteLine("What number do you want to search for?")
Dim searchKey As Integer = Console.ReadLine
Dim element As Integer = LinearSearch(searchKey, Exams)
If element <> -1 Then
Console.WriteLine("Value has been found in index " & element)
Else
Console.WriteLine("Value Not Found")
End If
Console.WriteLine("Press any key to close")
Console.ReadKey()
End Sub8
Function LinearSearch(ByVal key As Integer, ByVal numbers As Integer()) As Integer
Dim n As Integer
' structure iterates linearly through array
For n = 0 To numbers.GetUpperBound(0)
If numbers(n) = key Then
Return n
End If
Next
Return -1
End Function ' LinearSearch
End Module
f) A sailing club has both junior and senior members. Each member has a unique
membership number, name and address recorded. Three classes have been identified,
namely:
The classes Junior Member and Senior Member are related by single inheritance to the
class member
Member
membership #
name
address
ii) Programs that use objects of the class member need to add a new member‟s details and
show member‟s details and also amend a member‟s details. No other form of access is to
be allowed. Write a class definition for this class.
Member = Class
(Procedure) AddNewMembers; }
(Procedure) AmendMembers; } ;
(Procedure)ShowMembers; }
Private ;
MembershipNo : Integer
Name : String;
Address : String; ;;
End;
4 (a) Using a looping structure of your choice, write a program which outputs the following
result.
************
***********
**********
*********
********
*******
******
*****
****
***
**
* [12]
pattern(m, n) = InputBox("Enter
the pattern for" & m & "" & n)
Next n
Next m
For i = 0 To 12
lstResults.Items.Add(pattern(i, j) &
pattern(i, j + 1) & pattern(i, j + 2) &
pattern(i, j + 3) & pattern(i, j + 4) &
pattern(i, j + 5) & pattern(i, j + 6) &
pattern(i, j + 7) & pattern(i, j + 8) &
pattern(i, j + 9) & pattern(i, j + 10) &
pattern(i, j + 11) & pattern(i, j + 12))
Next i
End Sub
End Class
Module Module1
Sub Main()
Dim i, j As Integer
For i = 0 To 11
For j = 1 To 8 - i
Console.Write("*")
Next
Console.WriteLine()
Next
Console.ReadLine()
End Sub
End Module
(b) Modify the code you wrote in (a) so that it prints the shape upside down. [6]
pattern(m, n) = InputBox("Enter
the pattern for" & m & "" & n)
Next n
Next m
For i = 0 To 12
lstResult.Items.Add(pattern(i, j) &
pattern(i, j + 1) & pattern(i, j + 2) &
pattern(i, j + 3) & pattern(i, j + 4) &
pattern(i, j + 5) & pattern(i, j + 6) &
pattern(i, j + 7) & pattern(i, j + 8) &
pattern(i, j + 9) & pattern(i, j + 10) &
pattern(i, j + 11) & pattern(i, j + 12))
Next i
Module Module1
Sub Main()
Dim i, j As Integer
For i = 0 To 11
For j = 0 To i
Console.Write("*")
Next
Console.WriteLine()
Next
Console.ReadLine()
End Sub
End Module
(c) The following is a pseudo code of a program that was designed to add 10 positive
numbers.
1. Counter = 1
2. For counter = 1to 10
3. Repeat
4. Print “Enter a positive whole number”
5. Input number
6. Until number <0
7. Total = Total + counter
8. Counter = counter +1
9. Output Total
10. Next
(i) The pseudo code contains several errors. Identify and write down all the errors.
[7]
Line Error
1 No need to initialise the counter it is initialised in the For loop
2&3 Cannot use both the For and Repeat –Until statements together. Only one is
needed
5 Input number must be below the Repeat statement
6 Wrong statement It must be Until counter = 10
6 Until statement is wrong. It must be until count = 10
7 Number must be added instead of the counter
8 This statement is not needed when we use the For--Loop
9 Output statement must be the last statement
A’ level past exam papers
(ii) Rewrite the algorithm so that it is effective and error free. [5]
1. Total = 0
2. For count = 1 to 10
3. Input number
4. Total = Total + number
5. Next count
6. Output Total
OR
1. Count = 0
2. Total = 0
3. Repeat
4. Input number
5. Total =total + number
6. Count = count + 1
7. Until count = 10
(d) Write a program that accepts names of 30 students and the marks they obtain in a test.
The program then displays the name, mark and grade in one line. Grades are obtained using
the following grading scale:
70 – 100 A
60 – 69 B
50 – 59 C
45 – 49 D
40 – 44 E
0 – 39 F
A’ level past exam papers
End Select
If index <= 30 Then
lstresult.Items.Add(name & vbTab & mark & vbTab & grade)
TextBox1.Clear()
TextBox1.Focus()
TextBox2.Clear()
index = index + 1
Else
MsgBox("The array is full")
End If
End Sub
End Class
SECTION C
Delivery Note
209 Peter Mutare Zim 19, 20, 21, 22 Bag, shoes, socks,
Umbrella
198 Bruce Gwanda Zim 20, 21 Shoes, socks
(a) (i) Draw the 1NF of the above table. Underline Primary Key field(s). [5]
(ii) Come up with the 2NF of the table you created, indicating Primary Key field(s).
[14]
A’ level past exam papers
Delivery note
Product
Prod Numb Prod
Description
19 Bag
20 shoes
21 socks
22 umbrella
20 Shoes
21 socks
(b) A shop sells drinks. The shop has name, address and licenceno fields. Drinks have
name and manufacturer fields. Customers like drinks. Customers have name and
address.
Draw an ER Diagram to illustrate the above relationship. [11]
address
manufacturer
nam Shop
Sells Drinks name
ee
licencen
o
likes
name customers
address
A’ level past exam papers
6. At ABC High School, a teacher teaches many subjects. A student enrols in many subjects
and attends four lessons per week for each subject. Each subject is taught by several
teachers.
SubjectID
N taught 1
TeacherI
title
D
teache Subjects
Teacher s
1 N
attend
s
enrols N
name
StudentID Student
1
address
(b) (i) Draw a well-labelled diagram showing the different views of the Database
Management System Structure. [8]
Internal Schema
Internal Level
Database
Physical data Organisation
A’ level past exam papers
(ii) Using examples, describe the different views of the Database Management System.
7]
Iris recognition - this involves looking at the ring around the pupil of your
eye, which is uniquely coloured.
Palm Prints - combines the ridge flow and ridge structure of a palm to
identify a person. It works by capturing the vein pattern image of an individual
while radiating it with near-infrared rays. Its specialty is that it can detect the
vein pattern on the human palm with utmost precision
The complete set of characters that the computer uses, e.g. ASCII and
UNICODE.
Each of the characters in a character set must have its own binary value
which is the code by which the computer can recognise it.
(b) ASCII, [2]
3. (a) Using the binary number 11100111111101 as an example, show how to use
the binary representation of a number to work out its value in hexadecimal
with minimum amount of calculation. [3]
(b) A floating point number system uses 8-bit numbers, 5 bits for the mantissa and
3 bits for exponent. Convert the following binary number to denary 01101010
[2]
01101 010
0.1101 +2
011.01 = 3.25
(c) Using an 8-bit byte for the mantissa and an 8- bit byte for the exponent,
show – 15 ½ as a 2 byte, normalised, floating point number. [4]
00001111.1
= 10000100 11111100
(b) Every student in a school belongs to a Form. Every Form has a Form Tutor.
All the form tutors are teachers and some teachers are part-time. Some forms
have more than one Form Tutor although no Form Tutor can teach more than
one form. Students are identified by a student-ID and each form has a unique
form name.
Draw an ERD to show the relationship between the entities student, form and
Form Tutor. Student_ID Form_name
[6]
Student 1 belong
1 1 Form
s
1
1
teach
have es
M 1
Teachers are
Form Tutor
are part
time
5. (a) (i) Draw a diagram to represent the Von Newmann Architecture. [4]
Address bus
Memory CPU
Data bus
I/O ports
A’ level past exam papers
n (ii) Explain the role of an accumulator in the Fetch Execute Cycle. [2]
(iii) With the aid of a diagram, illustrate the Fetch Execute Cycle. [4]
Start
CPU activated
Increment PC by 1
Decode instruction
Is it an add Jump
instruction? instructi
on?
End
A’ level past exam papers
No
The data and program processing that data Contains two separate areas for
are stored in the same memory commands or instructions and data
Has only one bus which is used for both Use separate buses for data and
data transfers and instruction fetches commands
C
Write a logic statement that describes the above logic circuit. [3]
(b) Describe the following protocols as they are related to TCP/IP suite:
(ii) IP [2]
The IP portion sends each packet by specifying the address of both the
sending and receiving computers.
(c) State which layer each of the protocols in (b) belong to. [3]
IP - Network layer
9 (a) Explain the difference between static and dynamic data structures. [2]
(i) Show the binary tree after the following values have been input
Rusape, Victoria Falls, Bulawayo, Triangle, Alaska, West
Nichelson. [3]
Rusape
Bulawayo Vic.
Falls
(ii) Illustrate an algorithm using a flowchart for a program that accepts two
numbers A and B. If A>B then display “A is bigger”, if A<B then
display “B is bigger” else display “A and B are equal” [6]
A’ level past exam papers
Start
Input A & B
Yes Display A is
Is A > B
bigger
No
Yes Display B is
Is A <B
bigger
No
Display A =B
stop
(c) Arrange the following numbers in ascending order using the bubble sort
algorithm 17 8 2 11 0 [4]
Original list P1 P2 P3 P4
17 8 2 2 0
8 2 8 0 2
2 11 0 8 8
11 0 11 11 11
0 17 17 17 17
10. A software company has developed a new product for industrial usage.
(a) Define e-business. [1]
e-bussiness is doing business and providing services over the internet.
(b) Outline how an organisation can use any 3 Ps of marketing in launching and
marketing this newly developed product. [9]
Product
In marketing, a product is anything that can be offered to a market that might satisfy
a want or need. Managing the product includes product planning, product
A’ level past exam papers
The management is required to determine the basis for fixing the price of the product
and then establish policies for dealing with discounts, subsidies, freight payments and
price related situation. Various Pricing strategies generally adopted by the firms are:
It includes all the activities carried out to make people aware about the product.
Advertising, Personal selling and various promotional programmes are the major
activities which do the work of informing and persuading the prospects to buy the
products. Advertising is any paid form of personal or non-personal communication. It
is a notice or an announcement to the public with the use of printing materials,
pictures, or written words, audio or visual media.
Push Strategy: A “Push” promotional strategy uses company‟s sales force and trade
promotion activities to generate consumer demand for a product. The manufacturer
promotes the product to wholesalers, wholesalers promote it to retailers and retailers
promote it to consumers. Here the product is pushed on to the final consumer
therefore the name- Push.
Depending upon the decision relating to the amount to be spent on promotion one can
decide how to promote a product effectively which reaches the target audience.