You are on page 1of 69

INFORMATION TECHNOLOGY THEORY (1993)

Question 1
(a) Using appropriate examples, explain the difference between discrete and continuous data.
(b) Define the terms hard copy and soft copy.
Solution
(a) Discrete data represent data that permit only certain values (there are gaps between the
possible values)
Discrete data is countable.
ith continuous data given any two different values in an interval it is possible to find a value that falls
between them. !ontinuous data is measurable.
"xample# $.$ pound or %$.$ degree !elsius.
(b) &ard copy ' relatively permanent form of output that can be read immediately or stored for
later use, such
as output on paper.
(oft copy )transient (temporary) output, example, information displayed on a screen (monitor) or output
from a spea*er.
Question 2
(a) +ist ,-U. functions of an operating system.
(b) (i) /ive -0" benefit to the user of custom)written software.
(ii) /ive -0" benefit to the user of general)purpose software.
(c) hat do the abbreviations -1. and 12!. stands for3 Describe a situation in which
"4!& is used.
Solution
(a) 4n operating system does any of the following#
(i) !ontrols program execution (ii) !ontrols input and output (iii) 1anages data and file storage
(iv) 4ssigns different tas*s to the !5U (v) 5rovides security and control
(b) (i) !ustom)written software meets the specific need(s) of the user
(ii) /eneral)purpose software can be used by many different users
(!) 12!.) 1agnetic 2n* !haracter .ecognition
U(") reads data prerecorded on che6ues and deposits slips with a special ferrite)impregnated in* that
can be magneti7ed.
-1.) -ptical 1ar* .eader
U(") 2t is used in educational institutions for scoring examinations.
Question 3
Describe, using an appropriately labeled diagram, how a computer can be used to maintain the temperature of
li6uid between 8$
9
and :$
9
!.
Solution
(ignal to turn heater up;down ;off
Question
(a) 2dentify any <- industries and, for "4!&, state how the use of the computer has
resulted in either a
change of procedures for two =obs or made the =obs obsolete.
(b) 0ame ,-U. =obs which have been created by the computer industry.
(olution
(a) (i) !ar 1anufacturing 2ndustry
!ars are being assembled y computer controlled robots instead of manual labour producing better
6uality output.

(ii) !hemical industry
!omputers are used in the preparation of dangerous gases replacing the human factor.
(b) <he computer industry has created#
(i) 5rogrammers (ii) (oftware "ngineers (iii) !omputer -perators (iv) Data "ntry -perators
Question !
(a) Define "4!& of the following terms as it applies to data transmission#
(i) >oice band
(ii) (implex
(iii) &alf duplex
(b) (i) what is meant by data integrity3
(ii) (tate <- examples where a lac* of data integrity can causes loss, inconvenience or embarrassment.
Solution
(a) (i) >oice band has a band)width of %,999 and can transmit data at speeds in the range of ?99
to @9,999)
bits per second.
(ii) (implex are communication lines that permit data flow in only one direction.
(iii)Duplex are communication lines that permit data traffic in both directions but only in one direction at
a time.
(b) (i) Data integrity refers to techni6ues which protect a database against invalid alteration or
destruction.
(ii) a. 4ltering a personAs age, instead of an age value of @: an age value of %: is entered.
!omputer
ater
&eater
&eat to digital
converter
b. 2nput wrong information about a person in a medical history file, example, saying that the person
has cancer instead of saying he;she has a common cold.
Question "
(a) hat is a videotext system3
(b) Describe <- distinct uses of videotext systems.
(c) 0ame <- distinct effects that videotext systems can have on the traditional 5ost -ffice
Solution
(a) >ideotext is an information service in which data is transmitted over television cables or
telephone lines
and displayed on a television or computer screen in the home.
(b) >ideotext systems are used for#
(i) 4dvertising a product
(ii) (ending warning messages to users about dangerous weather.
(c) >ideotext systems#
(i) .educe the number of persons using the postal system.
(ii) .educe the paper flood caused by the traditional postal system.
Question #
(a) 2n 4(!22 !B code, the letters of the alphabet are stored using consecutive codes. 2f C is
represented by
@9999@9, what is the representation of /3
(b) /ive the binary value of D%
@9
E @@9@
D
Solution
(a) / is five ($) spaces to the right of C
<he binary value for $ is @9@.
<he binary representation of / is#
@ 9 9 9 9 @ 9
E @ 9 @
B @ 9 9 9 @ @ @
(b) <he binary value for D% is @9@@@
@ 9 @ @ @
E @ @ 9 @
@ 9 9 @ 9 9
Question $
rite a pseudocode algorithm to read a set of positive integers (terminated by 9) and print their aversge as
well as the largest of the set.
Solution
0umcount B 9
(um B 9
+argest B 9
2nput 0umber

hile 0umber not e6ual to 9 do
(um B (um E 0umber
0umcount B 0umcount E @
2f 0umber F +argest
+argest B 0umber
"ndif

2nput number
"ndwhile
4verage B (um divide by 0umcount
5rint (um, +argest
Question 9
rite a pseudocode algorithm to print a conversion table from miles to *ilometers. <he table ranges from $ to
@99 miles in steps of $ (@ mile B @.?@ *ilometers).
Solution
5rint G12+"( H2+-1"<".(I
5rint GB B B B B B B B BI
2nitials B $

hile initial JB @99 do

5rint initial initial K@.?@
2nitial E $
"ndwhile
Question 1%
rite a pseudocode algorithm to read a positive integer 0 followed by 0 integers. ,or these 0 integers, the
algorithm must count and print the number of 7ero and non)7ero values.
Solution
input 0
!-U0< B 9
0-0!-U0< B 9
L".-!-U0< B 9
repeat

input 0U1C".

if 0U1C". B 9
L".-!-U0< B L".-!-U0< E @
endif
if 0U1C". not e6ual to 9
0-0!-U0< B 0-0!-U0< E @
endif
!-U0< B !-U0< E @
until !-U0< B 0
INFORMATION TECHNOLOGY THEORY (199)
Question 1
Describe <- functions of "4!& of the following components of a computer#
(i) !ontrol unit (ii) 4rithmetic;+ogic Unit (iii) 1ain memory
Solution
(i) T&e 'ont(ol )nit *oes +n, o- t&e -ollo.in/0
1 reads and interprets program instruction
1 directs the operation of the internal processor component
1 controls the flow of programs and data in and out of primary memory
1 controls the flow of information to and from l;- devices.
(ii) T&e A(it&2eti'3Lo/i' )nit0
1 performs all arithmetic operations
1 performs logical operations
1 stores the data which can be immediately processed by the program instructions.
(iii) T&e M+in Me2o(,
1 stores program instructions prior to execution
1 stores the data which can be immediately processed by the program instruction
1 stores information temporarily after processing is complete.
Question 2
(tate -0" advantage and -0" disadvantage of the first item over the second item in "4!& of the following
pairs#
(a) (i) !haracter printer (ii) +ine 5rinter (b) (i) 1icrofilm output (ii) 5rinted output
(c) (i) 1agnetic tape (ii) 1agnetic hard dis* (d) (i) -ptical dis* (ii) 1agnetic hard dis*
Solution
(a) 4dvantage ) !haracter printer is cheaper than a line printer
Disadvantage ) !haracter printed is slower than a line printer
(b) 4dvantage ' 1icrofilm output can store much more information in a smaller space than printed
output.
Disadvantage ' 1icrofilm is more expensive than printed output; 1icrofilm needs special e6uipment
to read the information, printed output does not.
(c) 4dvantage ) 1agnetic tape is cheaper than magnetic hard dis* ; 1agnetic tape has a larger capacity
than magnetic hard dis*.
Disadvantage ' (lower access to date;records).ecords cannot be updated in place
(d) 4dvantage) -ptical dis* has a larger capacity than magnetic hard dis*
) -ptical dis* can retain data longer than magnetic hard dis*
) -ptical dis* is ."4D -0+M therefore information cannot be tampered with
Disadvantage)-ptical dis* is slower, more expensive than magnetic hard dis*
)-ptical dis* is ."4D -0+M
Question 3
(a) "xplain briefly "4!& of the following terms
(i) Cistable device (ii) /igabyte (iii) -perating system (iv) Car code
(b) (i) hat is an expert system
(ii) 0ame -0" area in which expert systems are used
(iii) /ive -0" advantage and one disadvantage of using an expert system in the area named at (ii)
above.
Solution
(a) (i) Cistable devices are devices capable of assuming either one of two stable states, for example a
light switch is a bistable device, it can either be on or off.

(ii) /igabyte is @,999,999,999 bytes or @9
:
bytes.
(iii) -perating system is a set of programs used for controlling the operations of a computer system.
(iv) Car !ode is a series of parallel light and dar* lines representing a code placed on a product for
identifying that product.
(b) (i) 4n expert system is a program that reproduces the *nowledge and thought processes of human
experts in certain well defined fields.
(ii) 4reas of application ' any -0" of the following#
) 1edicine# diagnosis of infections blood diseases, prescription of medicine
) /eology# search for mineral deposits
) !hemistry# identifying molecular structure of compounds
(iii) advantages) does not display biased =udgments
) does not =ump to conclusions on the face of contrary evidence
) systematically considers all possible alternatives
disadvantages) not good at =udgment re6uiring common sense
) cannot adapt easily to new rules and concepts
) cannot reason across disciplines
Question
"ach regional office of Namaican ,ood !rop 1ar*eting 4gency uses a system of hardware, software and
communication channels that connects hardware devices to provide its computing services. 2nformation is
collected at the regional offices and at the end of the day it is transferred to a main)frame computer at the head
office in Hingston. 4t nights, this mainframe at head office collates the information and transfers it to the
regional offices using different rules established to govern the way data is transmitted in the particular
networ*. 4part from providing up 'to)date information to users through its regional offices, the system allows
users access to the information at their own homes. &owever, to utili7e this facility users must subscribe to its
special service which allows them to send and receive messages to;from other users. <he cost of this facility is
affordable to the average home)user since the subscription fee is small and the only other capital cost is the
price of a device which convert digital signals into analog signals and vice versa.
(tate the proper te'&ni'+l te(2s for "4!& of the ,-U. underlined phrases in the above passage.
Solution
(i) +ocal 4rea 0etwor*
(ii) 5rotocol
(iii) Culletin Coard of "lectronic 1ail
(iv) 1odem
Question !
(a) Describe <- =obs "4!& of the following#
(i) (ystem 4nalyst
(ii) !omputer -perator
(iii) Database 4dministrator
(b) (tate <- ways in which a computer can be used by a teacher in his;her =ob.
(c) (tate <- ways in which the computer is beneficial to the ban*ing industry.
Solution
a. (i) A s,ste2 An+l,st *oes +n, o- t&e -ollo.in/0
1 5erforms feasibility studies
1 derives information system, re6uirements;specifications
1 designs information systems
1 performs system reviews
(ii) A Co24ute( O4e(+to( *oes +n, o- t&e -ollo.in/0
1 prepares e6uipment to run =obs
1 mounts and removes tapes, dis*s and dis*ettes
1 monitor operations during the running of each =ob

(iii) A 5+t+6+se A*2inist(+to( *oes +n, o- t&e -ollo.in/0
1 designs a database
1 creates a database
1 maintains a database
1 coordinates discussion between user groups

b. A te+'&e( '+n use t&e 'o24ute( to *o +n, o- t&e -ollo.in/0
1 develop course wor*
1 store students records
1 use G!omputer 4ides 2nstructionI software
1 teach students to use the computer
1 mar* scripts
c. T&e 'o24ute( is 6ene-i'i+l to t&e 6+n7in/ in*ust(,8 6e'+use it0
1 provides management with useful information for running the ban*
1 *eeps records of transactions by customers
1 provides electronic funds transfer
1 provides automated teller services
Question "
(a) ,or "4!& of -1.,-!. and 12!., give an application in which that technology is fre6uently used.
(b) Data security refers to the protection of data from destruction or corruption.
(tate <&."" measures which can be employed to ensure data security.
Solution
(a) OMR) reading of solutions to multiple choice 6uestions
OCR) converts a printed document to machine)readable form so that it could be edited on a
!omputer
MICR9 used by ban*s for reading information on che6ues
(') To ensu(e *+t+ se'u(it, one 2+,0
1 use fire)proof cabinets for storing tapes and dis*s
1 perform bac* up and recovery procedures properly
1 implement a password system to prevent unauthori7ed access
1 use anti virus software
1 use software features to restrict access to certain records.
Question #
(a) 2n a certain character coding system, each character occupies seven (O) bits and the letters
of the alphabet
4re assigned consecutive codes. 2f 1P is represented by @9@999@, what is the representation of &3
(b) hat is the value of Q 2 the following e6uations3
$D
@9
) Q
D
B @@@@@
D
Solution
(a) H B 1)$R&is consecutive spaces to the left of 1S
M : @9@999@ B 8@RDecimal valueS
H : 8@)$ B O? B @99@@99 RCinary >alueS
(b) $D
@9
'Q
D B
@@@@@
D
B %@ RDecimal >alueS
Q
D
B $D )%@ B D@ B @9@9@ RCinary >alueS
Question $
(a) hat is the purpose of formatting or initiali7ing a dis*ette3
(b) hat is the ma=or interfacing device for
(i) a command language interface3
(ii) a graphical user interface3
(b) "xplain briefly -0" distinguishing feature of "4!& interface mentioned in part(ii)
Solution
(a) -ne formats a dis*ette to place electronic mar*s on the surfsce of the dis*ette so that
data can be written to and read from their specific addresses.
(b) (i) <he *eyboard is the ma=or interfacing device for a command language interface.
(ii) <he mouse is the ma=or interfacing device for a graphical user interface.
(!) Using a command language interface (!+2), the user points to a picture (or icon) of a data file or
program or a selection from a menu and activates the program or selection by clic*ing the
pointing devices (usually mouse).
Question 9
(a) rite an algorithm to interchange the value in two (D) variables 4TC.
(b) rite an algorithm to read the names and ages of ten (@9) people and print the name of the
oldest
person. 4ssume that there are no persons of the same age. Data is supplied in the following form#
name, age, name, age etc.

Solution
(a) ! B 4
4 B C
C B !
(b) -+D4/" B 9
,or = B @to @9
.ead 041", 4/"
2f 4/"F -+D4/" then
-+D4/" B 4/"
-+D5".(-0 B 041"
"ndif
"ndfor
5rint G<he oldest person isI , -+D5".(-0
Question 1%
(a) rite an algorithm to read an integer value for (!-." and print the appropriate grade based
on the
following#
(!-." /.4D"
89 or more 4
+ess than 89 but ?$ or more C

+ess than ?$ but $9 or more !
+ess than $9 ,
(b) hat is printed by the following algorithm when n B $3
2f (n B @) or ( n B D ) then
h B @
else
f B@
g B @
for = B @ to n)D do
h B f E g
f B g
g B h
print h
else for
end if
print f, g
stop
Solution
(a) read (!-."
2f (!-."F B 89 then
printG4I
"lse if (!-." F B ?$ then
print GCI
"lse if (core F B $9 then
printG!I
"lse
printG,I
"ndif
(') T&e -ollo.in/ is 4(inte* 6, t&e +l/o(it&2 .&en n ; !0

D,%,$,%,$
199!
Question 1
(a) +ist <- benefits of !omputer 4ided Design and Draughting.
(b) 0ame <&."" peripheral devices which are used in !omputer 4ided 1anufacturing but
which are not
!ommonly used in an office.
( !) (tate a measure which can be adopted a minimi7e data and;or program corruption or loss in the event of a
hard dis* failure.
(c) hat is software piracy3
Solution
(a) !omputer 4ided Design and Draughting provides#
i. improved accuracy and legibility of engineering drawing
ii. ease of ma*ing alterations to designs leading to increased productivityP
iii. decreased time for developing blue printsP
iv. increased detailP
v. simulation;cost estimation facilities
(b) i. (ensors ii. .obots (robotic arms) iii. /uided pallets
(c ) !opy files unto bac*)up devise on a regular basis and in the evet of a hard dis* failure recovery is
accomplished by replacing the damaged and lost files on the hard dis* by the last copy of the files
from the bac*)up device.
(d) (oftware piracy is the illegal copying of program(s).
Question 2
Draw a labeled diagram showing the main component of a computer system, indicating clearly the direction in
which data flow.
Solution
Question 3
205U<
D">2!"
!5U -U<5U<
D">2!"
C4!H20/
(<-.4/"
(a) !onvert the decimal number $$ to its binary e6uipment.
(b) !onvert the binary number @9@@9@9 to its decimal e6uipment.
(c) 4dd the binary numbers @@9@9 and @99@@.
(d) <he 4(!22 code for the letter & has a decimal e6uivalent OD. hat is the 4(!22 code
for the letter 5.
Solution
(a)

$$
@9
B @@9@@@
D
(b)

@ 9 @ @ 9 @ 9
D
?
D
$
D
U
D
%
D
D
D
@
D
9
@9@@9@9
D
BD
?
E D
U
E D
%
E D
@
Rignoring columns with 9S
B :9
@9
(c) @ @ 9
@
@ 9
D
E @ 9 9 @ @
D

@ 9 @ @ 9 @
D
(e) pB OD E8 B 89 B@9@9999 RCinary e6uivalentS
Question
hen a program ma*es a read re6uest to the hard dis*, the device which reads data from the dis* is
moved along a radius to the particular concentric circle on with the data is stored. hen the relevant
part of the concentric circle of the dis* arrives under the device which reads the data, the data is read
and stored in a special area of memory from which it could be accessed.
(tate the proper te'&ni'+l te(2s for "4!& of the ,-U. underlined phrase in the passage above.
D
D
D
D
D
D
D
$$
DO
@%
?
%
@
9
@
@
@
9
@
@
Solution

(i) read;write head (ii) trac* (iii) sector (iv) buffer
Question !

(a) 2dentify ,-U. measures to secure data.
(b) (tate <- advantage and <- disadvantages of normal mail over electronic mail.
Solution
(a) -ne can secure data by#
(i) encryption (ii) virus protection (iii) password (iv) physical access restriction
(b) advantages
(i) parcel can be sent
(ii) sent to more people (people without computer
disadvantages
(i) mail could be lost
(ii) mail ta*es a longer time
Question "
(a) +ist ,-U. ways in which medical personnel may use information technology in
their =obs.
(b) (tate <- =ob functions of "4!& of the following computer personnel#
(i) 0etwor* manager (ii) Database administrator
Solution
(a) 1edical personnel may use information technology for#
(i) (toring patient records (ii) expert system
(iii) &ealth education (iv) monitoring patients
(b) (i) 4 networ* 1anager does any of the following#
1 (tarts up and shuts down the networ*
1 grants access privileges
1 monitors use of the networ* and other shareable resurces
1 liaise with other networ* re# connectivity
(ii) 4 database administrator#
1 grants access to data
1 ma*es modification to database structure
Question #
(a) Nohn receives computer hardware from a friend who lives in the United (tates of
4merica, but the software is missing. &e, therefore, decided to purchase the
necessary software. 2n order for his system to run he reali7ed that he would have
to purchase software to manage the resources of the computer as well as
software which could provide for his particular needs. ,or both types of
software he had a choice of two styles of interfaceP one which was command
driven or the other which provides screen listings with options from which the
user could select appropriate functions. (ome software provides user interfaces
which display small graphic images that can be selected when the function they
represented is re6uired. (ince Nohn intended to use the computer in his family
business, he had a choice of ac6uiring software written especially for his
business or general purpose software. &e noted, however, that if he purchased
general purpose software, that he would have to do some modification to allow
it to meet his specific need.
(tate the proper te'&ni'+l te(2s for "4!& of the (2Q underlined passages.
(b) (tate <- functions of an operating system.
Solution
(a) (i) system software (ii) application software (iii) 1enus (iv) 2!-0(
(v) custom)written software (vi) customi7ation
(b) T.o -un'tions o- +n O4e(+tin/ S,ste2 +(e0
(i) input;output control (ii) file and dis* management
Question $
hat is printed by the following algorithm3

(U1 B 9
0 B D9
&2+" 0J %9 D-
(U1 B (U1 E 0
5.20< 0, (U1
0B 0 E %
"0D&2+"
Solution
D9, D9,D%,U%,D?,?:,D:,:8
Question 9
(a) Define the following#
(i) (ource
(ii) -b=ect
(iii) !ompiler
(b) Draw a labeled diagram to illustrate the relationship between source code, ob=ect code and
compiler.
(c) rite a pseudocode algorithm to read in <&."" numbers and print the highest and lowest number.
Solution
(a) (i) (ource code is program written in a programming language
(ii) -b=ect code machine language, program produced by a computer
(iii) 4 compiler is a computer program which converts a program in a high level
programming language to machine code.
(b)
(b) read 4,C,!
2f ((4BC) and (4B!)) then
5rint G0umbers are e6ual
endif

if 4FC then

+4./"(< B 4
(14++"(< B C
else
+4./"(< B C
(14++"(<B4
endif
if !F+4./"(< then +4./"(< B !
if !J(14++"(< then (14++"(< B !
print +4./"(<
print +4./"(<
Question 1%
<he following data represents some sample score obtained by students in a test#
$ , U, O, @9, 9, ?, 9, @, 9, :, 8, :::

::: is the dummy value which terminates the data. rite pseudocode algorithm to read
any data in the above format, and print the number of students scoring 9 and the number
scoring @9.
Solution
L".-!-U0< B 9
<"0!-U0< B 9
2nput 0U1C".


while 0U1C". not e6ual ::: do

if 0U1C". B 9 then
L".-!-U0< E@
endif

(-U.!"
!-D"

!-152+". -CN"!<
!-D"
2f 0U1C". B @9 then
<"0!-U0< E @
endif
.ead 0U1C".
endwhile
print G0U1C". of students scoring 9I, L".-!-U0<
print G0U1C". of students scoring @9I, <"0!-U0<
199"
Question 1
(tate -0" difference between "4!& of the following#
(a) !ommand)line interface and graphical user interface
(b) 2mpact printers and non)impact printers
(c) !haracter printers and line printers
(d) /eneral purpose software pac*age and speciali7ed software pac*age
(e) (implex and duplex transmission
Solution
(a) (i) 2nterfacing device for command)line driven interface is the *eyboard while that for graphical
user interface is the mouse.
(b) (i) 2mpact printers can produce multiple carbon copies of a document while non)impact cannot.
(ii) 2mpact printers are more expensive than character printers.
(c ) (i) +ine printers are faster than character printers.
(ii) +ine printers are more expensive than character printers.
(d) (i) /eneral purpose software pac*age can be used to perform a wide variety
of tas*s while speciali7ed software pac*age cannot.
(e) (i) Duplex transmits data in both directions, while simplex transmits data in one direction only.
Question 2
(a) !onvert the decimal number $O
@9
to a binary number.
(b) !onvert the binary number @@9@@@9@
D
to decimal number
(c ) "xplain the term parity as it relates to the coding of characters.
(d) 4dd the binary numbers @@9@9@
D
and @9@@@9
D
Solution
(a)
$O
@9
B @@@99@
D
(b)

@ @ 9 @ @ @ 9 @
D
O
D
?
D
$
D
U
D
%
D
D
D
@
D
9
@@9@@@9@
D
B D
O
E D
?
E D
U
E D
%
E D
D
E D
9
B DD@
@9
( c) 5arity is used as a chec*ing system or dummy value within the coding of character.
2t is used to detect whether the transmission or coding of data is complete or accurate.
(d) @ @ 9 @ 9 @
D
E @ 9 @ @ @ 9
D


@ @ 9 9 9 @ @
D
Question 3
0ame the hardware component that performs "4!& of the following functions#
(a) (tores programs and data that are currently being used by the !5U
(b) 5erforms the logical operations within the !5U
V (tores programs and data that are not currently being used by the !5U
(d) 1odulates and demodulates signals
(e) .eads from dis*s
(f) Directs internal operations within the !5U
(g) 4llows users to move the cursor
Solution
(a) .41 (.andom 4ccess 1emory)
(b) 4+U (4rithmetic ; +ogic Unit)
(c ) (econdary (torage (e.g. Dis*ettes, magnetics tapes, etc)
(d) 1-D"1
D
D
D
D
D
D
$O
D8
@U
O
%
@
9
@
9
9
@
@
@
(e) .ead;rite &ead
(f) !U (control Unit)
(g) 2nput Device (Heyboard, 1ouse etc.)
Question
<he statistic Department holds confidential information on the citi7ens of a country since its databases
are online and are connected to the telephone company via a modem, any person with a computer and
a modem can potentially access from the databases. -utdated data are usually stored at other locations.
(a) (tate -0" method which can be used to prevent an unauthori7ed user from accessing data stored
in the databases.
(b) (tate <- methods which can be used to prevent users from accessing data from files to which
they do not have access.
(c) (tate -0" potential danger that may exist when legitimate users within the (tatistics Department
import data into the departments computer.
(d) (tate <- strategies to protect the archived data from physical damage.
Solution
(a) 5assword 5rotection
(b) (i) 5assword 5rotection
(ii) Data encryption
(c) >irus infection
(d) (tore archive data away from the elements (wind, rain etc)
Question !
(a) <he increase in the level of computeri7ation in offices, together with the decrease in cost and the
availability of data communication services have created new ways of conducting business. (ome
employees now have an opportunity to perform their wor* from home by a process *nown as
telecommuting.
(i) (tate <- items of hardware that an employee must have if he;she is telecommuting.
(ii) (tate -0" advantage to the employee of telecommuting.
(iii) (tate -0" disadvantage to the employee of telecommuting.
(b) <he owner of a larger department store in the city center is planning to offer telemar*eting
services to the general public. !urrently, his retaining business customers are encouraged to
browse in the store. <hey are normally offered assistance by the sales cler*. 2f a customer is
satisfied with a particular item, he;she ta*es the item to the cashier where the customer must pay in
cash. 4fter the transaction is completed, the customer must ta*e away the item(s) purchased.
(i) (tate <- additional services that the owner should offer so that he could introduce
telemar*eting .
(ii) (tate -0" change that the owner must ma*e in the operation of his business so that he
could introduce telemar*eting.
(iii) (tate -0" reason why a customer might still choose to visit the store to ma*e a purchase
even though the cusromer might have to travel a long distance to get to the store.
Solution
(a) i. 1odem , ,ax machine, .eduction in travel expenses;fuel consumption
wor*ing men and women would be able to spend more time with their families.
ii. <he wor*er might miss out on promotion opportunities at central head6uarters.
(b) i. &ome delivery of items purchased (ubscrption maga7ines advertising products to
customers.
ii. Use of electronic fund transfer instead of cash payment for goods bought.
iii. <o examine products being bought.
Question "

(a) (tate <&."" functions that are li*ely to be computeri7ed when the Coard of Directors of
a private local ban* with several branches has decided to computeri7e its operations.
(i) (tate <- new =ob positions that would be created in the ban*.
(ii) (tate -0" additional service that the ban* would now be able to provide.
Solution
(a) (i) .ecord)*eeping, payroll, billing and ordering of drugs and supplies
(ii) 4utomating the recording of patient histories
(iii) 1onitoring critically ill patients in surgery and intensive care units
(iv) .ecording and analy7ing the result of health screening examination to help detect
diseases that might otherwise go unnoticed.
(v) .ecording and interpreting the results of electrocardiograms ("!/s)
(b) (i) 5rogrammers , Database admistrator
(ii) ",< ("lectronic ,und <ransfer) , 4<1 (4utomated <eller 1achines)
Question #
(a) <he customer (cience teacher in a secondary school is attempting to convince the
!hemistry teacher to use !omputer 4ided +earning (!4+) software in the teaching of
!hemistry.
(i) (tate <- benefits that the !omputer (cience teacher could cite to convince the
chemistry teacher.
(ii) (tate <- obstacles that would prevent the chemistry teacher from using the computer in teaching.
Solution
(a) (i) !omputers could be used to stimulate experiments eliminating the use of dangerous
chemicals.
(low students could learn at their own pace.
(ii) ) <eacher not computer literate
) +arge class si7e
) !ost of computer hardware and software.
Question $
(a) !opy the following trace table in your solution boo*let.
< M Y =
1
2 $


!omplete the following trace table for the following algorithm, given that the number U
is the input value.
.ead Q
,or 1 B @ to Q do
M B Q ' 1
L B $KM)1
"nd
5rint L
(b) hat is printed by the algorithm3
Solution
(a)
(b) )U
Question 9
(a) rite an algorithm which prompts the user to enter the price of an item and which
!alculates and prints the new price after a discount of @DW.
Q 1 M L
U @ % @U
U D D 8
U
U
%
U
@
9
D
)U
(b) rite an algorithm to read in <- numbers into 4 and C. <he algorithm should store
the smaller in 4 and the larger in C, and print 4 and C.
Solution
(a) 2nput 5.2!"
0"5.2!" B 5.2!" E (5.2!" K 9.@D)
5rint 0"5.2!"

(b) 2nput 4
2nput C
2f 4 B C then print G0umbers are e6ualI endif
2f 4 F C
! B C
C B 4
4 B !
"ndif
5rint 4, C

Question 9
rite an algorithm to read "+">"0 numbers, find their average and print it. <he
algorithm should also print the number of times the number ? occurs in the data.
,or example, given the input data#

8 U ? : ? $ ? @9 O 9 @?

<he algorithm should print O as the average and % as the number of times ? occurs.
Solution
(U1 B 9
(2Q!-U0< B 9
,or !-U0< B @ to @@ do

2nput 0U1C".
(U1 B (U1 B 0U1C".

2f 0U1C". B ?
(2Q!-U0< B (2Q!-U0< E @
"ndif
"nddo
4>".4/" B (U1 divide by @@
5rint 4>".4/", (2Q!-U0<
199#

Question 1
(a) 0ame a type of device which produces a human readable copy.
(b) 0ame a type of device which produces a machine readable copy.
(c) 0ame a type of device that accepts data in human readable form.
Solution
(a) 5rinter , 5lotter
(b) Dis* Drive
(c) Heyboard
Question 2
<he wide variety of input devices and media is a ma=or factor which adds to the flexibility and
versatility of computer systems. <he use of a (i) device which allows users to move around image
on the monitor by the shifting of a lever on the device has made computer games very popular. 2n
supermar*ets, there are (ii) devices which allow a cashier to *ey in data on sales and this data is
automatically transmitted to a computer for processing. <here also (iii) devices that are capable of
reading pencil mar*s on an examination script thereby allowing the test to be scored automatically.
<he use of (iv) devices to read in images allow pictures and logos to be incorporated in a
document.
(tate the technical names for "4!& of the devices numbered (i) ' (iv) in the passage above.
5lease use the numbering indicated in the passage to identify your solutions.
Solution
(i) Noystic* (ii) 5oint of (ale terminals (iii) -ptical 1ar* .eaders (iv) (canner
Question 3
(a) !onvert the decimal number 8% to its binary e6uivalent.
(b) !onvert the binary number @@99@@9@ to its decimal e6uivalent.
(c) 4dd the two binary numbers @@9@ and @99@9@.
(d) "xplain the difference between discrete and continuous data.
Solution
(a) 8%
@9
B @9@99@@
D
(b)
@ @ 9 9 @ @ 9 @
D
O
D
?
D
$
D
U
D
%
D
D
D
@
D
9
@@99@@9@
D
B D
O
E D
?
E D
%
ED
D
E D
9
B @D8 E ?U E 8 E U E @
B D9$
@9
(!) @ @ 9 @
D
E @ @ 9 @ 9 @
D
@ @ 9 9 @ 9
D
(d) (ee @::% Xuestion @ (a).
Question
(4) (tate <&."" ways in which a teacher would use a computer in his or her
=ob.
(C) (tate <- ways in which a =ournalist would use a computer in his or her =ob.
(!) 4 large company has decided to computeri7e the functions of its &uman
.esource (5ersonnel) Department. <he computer department has been given
the responsibility for completing the tas*.
(D)
0ame ,-U. categories of personnel from the !omputer Department that the !omputer
Department 1anager must assign to the tas*, stating clearly -0" function of "4!& category.
Solution
(4) (i) <o store students records
(ii) <o use !omputer 4ided 2nstruction to aid in teaching
(iii) <o mar* scripts
(C) (i) <o research a topic using the internet
(ii) <o creates articles
(!) >ERSONNEL F)NCTION
(i) 5rogrammers rites programs that solves specific problems
(ii) Data "ntry !ler*s )se 7e,9ent(, *e?i'es to ente( (+. *+t+ into 2+'&ine9
(e+*+6le -o(2+t1
(iii) Database 4dministrator !reates and controls the use of an organi7ations database.
(iv) (ystems 4nalysts ))))))))) <he analyst interacts with various users of a computer systems
and with programmers to help analy7e, design and implement
the new computer system.
Question !
(4) Describe briefly an application in which a robot (or robotic arm) is used in
industry, (tarting clearly -0" function that the robot performs.
(C) (tate <- advantages of using the robot (or robotic arm) over using a manual method
in the application described in part (a) above.
(!) (tate -0" advantage to the customer of telemar*eting.
(D) (tate -0" disadvantage to a customer of telemar*eting.
(") (tate -0" advantage and -0" disadvantage of teleconferencing.
Solution
(4) .obotic arms are used in the manufacturing of motor vehicles. -ne function that the robotic
arm serves is to spray the motor cars with a uniform coat of paint.
(C) i. <he robot does not miss
ii. 2t wastes less than half as much paint as a human painter does.
iii. <hey are not affected by the dangerous fumes or heat, therefore they do not get sic*.
(!) <he customer does not have to travel long distances to ac6uire a product.
(D) <he customer is unable to examine the product closely before purchase.
(") 4dvantage# <he customer can see their friends or relatives anywhere on the globe while
(pea*ing to them.
Disadvantage# <he cost of the e6uipment and service are high.
Question "
(4 T C)
St+te T@O 4(o6le2s .&i'& .oul* +(ise -(o2 t&e s&+(in/ o- *+t+ in t&e 'o24+n,1
(!) hat is data encryption3
(D) (tate <- methods, other than data encryption, used to secure data.
(") "xplain the difference between the role of an applications programmer and that of a systems
programmer in an organi7ation.
Solution
(4) Cecause it is ta*ing away from the creator of the program the right to earn from his or her
creation.
(C) i. <he integrity of the data is at ris* seeing that anybody can modify it
ii. <here is no privacy
(!) Data encryption is the scrambling of data to render it unintelligible to an unauthori7ed
recipient.
(D) i. 5assword protection
ii. +oc* away the dis*s and computers when they are not in use.
(") 4n 455+2!4<2-0 5.-/.411". writes programs that solve specific problems for users.
4 (M(<"1 5.-/.411". creates and maintains operating systems, monitors database
programs, and so forth.
Question #
(4) hat is meant by the term protocol3
(C) "xplain the difference between the following terms#
(i) Up)load and down)load
(ii) &alf)duplex and duplex
(iii) +ocal area networ* and wide area networ*
(iv) "lectronic mail and bulletin board
Solution
(4) 4 GprotocolI is a formal set of rules that govern how communication or exchange of data
ta*es place over a networ*.
(C) i. U5Y+-4D is the process of reading data from a users computer storage and sending it
to another computer via communication channel. D-0)+-4D is the process whereby
programs or data are transferred via communication channels, from a computer and
stored on a media located at the user site.
ii. &4+, Duplex is transmission system that allows data to be transmitted in one direction
at a time. <hat is, the system can transmit and receive data but not at the same time.
DU5+"Q is a transmission system that allows data to be transmitted in both direction at
the same time. <his system is sometimes called ,U++DU5+"Q.
iii. 4 local area networ* is the lin*ing of computers or terminals in the same building or
site so that they can communicate. <his communication usually ta*es place along
cables. 4 2D" 4."4 0"<-.H is the lin*ing of computer or terminals over a wide
geographical area in order to facilitate communication system using telephone lines,
satellites, microwave transmission or any other medium that facilitates long distance
communication.
iv. "lectronic 1ail is mail or messages transmitted electronically by computers
via communication channels. 2t is usual for such messages to be held in a central store
for retrieval at the users convenience. 4 Culletin Coard is an electronic e6uivalent of a
conventional bulletin board. 2t is used as part of a communication networ* where users
can post messages, read messages posted by other users, communicate with the system
operator and upload or download programs.

Question $
hat is printed by the following algorithm3
!-U0< B @
Q B D
hile !-U0< J D$ D-
Q B Q E D
print !-U0<, Q
!-U0< B !-U0< E $
endwhile
Solution


CO)NT < >RINTE5
@ D @, U
? U ?, ?
@@ ? @@, 8
@? 8 @?, @9
D@ @9 D@,@D
D? @D
<he following is printed#
@, U, ?, ?, @@, 8, @?, @9, D@, @D
Question 9
(4) "xplain the difference between a high level programming language and a machine
level language.
(!) "xplain the difference between an interpreter and a compiler.
(D) rite a pseudocode algorithm to read two numbers and print the lower value.
Solution
(4) 4n HIGH LEAEL >ROGRAMMING LANG)AGE is one that is more intelligible to
human beings and, before it can be understood by the machine it has to be converted to a
form that the machine can understand. MACHINE LANG)AGE consists of data and
instruction as coded binary digits, 9s and @s. 0o translation is necessary for the computer
to understand this language.
(C) INTER>RETERS translate high)level language statements one at a time, executing each
step immediately after it has been translated. 0o permanent ob=ect program is generatedP
each time a source program statement is encountered, it is re)interpreted. COM>ILERS
translate the entire source code (all statements) to its ob=ect code before execution ta*es
place. 4 permanent ob=ect program is generated. henever changes are made to the source
code, the program has to be re)compiled for the changes to ta*e effect.
(!) read 4
read C
if 4BC <&"0 5.20<
G0umbers are e6ualI
endif
if 4JC
print 4
else
print C
endif
Question
<he following data represents some sample data of the number of children in several
families.

@ % $ 9 U ? O % $ D U 9 D :::

::: is the dummy value which terminates the data. rite the pseudocode algorithm read in
any data in the above format, and print

(4) <he number of families with no childrenP and
(C) <he largest number of children existing in any family
Solution
read 0U1C
9!-U0< B 9
&2/&"(< B 0U1C
while 0U1C JF ::: D-
if 0U1C B 9 <&"0
9!-U0< B 9!-U0< E @
endif
if 0U1C F &2/&"(<
&2/&"(< B 0U1C
endif
read 0U1C
endwhile

print Gnumber of families with no children BI, %CO)NT
print G largest number children BI, HIGHEST
199$
Question 1
(4) Define the term protocol as it relates to data communication.
(C) Digital transmission can occur in three ways#
(i) Data can be transmitted in one direction only.
(ii) Data can be transmitted in both directions but only in one direction at a time.
(iii) Data can be transmitted in both directions simultaneously.
(tate the correct technical term for "4!& of the transmission methods above.
(!) (i) 0ame type of networ* that would be suitable for lin*ing all the computers in a building.
(ii) (tate -0" advantage of lin*ing the computers in this way.
Solution
(4) 5rotocol is a set of rules that govern the communication of data between a terminal and a
computer or between computers.
(C) Digital transmission can occur in the following three ways#
i. (215+"Q
ii. &4+, DU5+"Q
iii. ,U++ DU5+"Q
(!) (i) +ocal 4rea 0etwor* (+40) would be the most suitable for lin*ing computers in a
building.
(ii) 4dvantages of lin*ing the computers in this way are#
) the computer e6uipment e.g. printers, can be shared by several users hence reduction
in cost.
) 2nstead of buying many software program for each 5!, the software can be installed
onto the main computer and the users access this computer. 1emos and other
teaching materials can also be done using this method.
Question 2
hen a program ma*es a read re6uest to the dis* drive, the component which reads data from the
dis* is moved along a radius to the particular concentric circle on which the data are stored. hen
the relevant part of the concentric circle of the dis* arrives under the component, which reads the
data, the data are read and stored in a special area of memory from which they could be accessed.
(tate the proper technical term for each of the ,-U. underlined phrases in the passage above.
Solution
<he proper technical terms for each of the four underlined phrases are#
i. .ead;rite head
ii. <rac*
iii. (ector
iv. Cuffer
Question 3
1atch the following applications with the most appropriate input device.
455+2!4<2-0 205U< D">2!"
5oint)of)sale optical mar* reader
/ames *eyboard
4rchitectural design magnetic in* character recognition
1ultiple)choice examination microphone
5ublishing pads and tablets
!he6ue processing barcode reader
+anguage processing =oystic*
5reparing letters scanner
Solution
455+2!4<2-0 205U< D">2!"
5oint)of)sale barcode reader
/ames =oystic*
4rchitectural design pads and tablets
1ultiple)choice examination optical mar* reader
5ublishing scanner
!he6ue processing magnetic in* character recognition
+anguage processing microphone
5reparing letters *eyboard
Question
(4) Define the term resolution as it applies to a graphic display.
(C) /ive <&."" examples of input devices that can read data directly from source
document.
(!) /ive <- advantages of using devices that can read data directly from source
documents.
Solution
(4) .esolution refers to how clear an image is seen on the screen. 2n other words,
image clarity.
(C) "xamples of input)devices that can be read directly from source documents are#
i. bar)code readers
ii. mar* and character readers
iii. image scanners
(!) <wo advantages for using devices that read data directly from source documents are#

i. 5rocessing of data is faster and therefore saves time
ii. <he method reduces the error produced when data is being entered.
Question !
(4) hat is a computer virus3
(C) (tate <- measures that could be implemented in order to prevent a computer virus
from infecting a computer.
(!) 2dentify <- ways in which a person could be affected by the misuse of personal
information, which has been stored in a data ban*.
(D) 2dentify <- ways by which personal information, stored in data ban*, may become
inaccurate.
Solution
(4) 4 computer virus is a program that attaches itself to other programs or files and then
replicates itself in such a way that it corrupts and destroys data.
(C) 1easures that could be implemented are#
i. use of 4nti)>irus programs e.g. 0-.<-0 4nti)>irus 5rogram
ii. do not share dis*ettes
iii.avoid downloading information from Culletin Coard (ervices that do not chec* for
viruses regularly
(!) ays in which a person could be affected by the misuse of personal information are#

!an result in discrimination if personal information is not *ept confidential. ,or e.g. if
confidential medical records are seen by the wrong persons, such as prospective employers, then it
can lead to discrimination.
ii.2f unauthori7ed persons can access the data ban*, then they can change pertinent information about
the individual thereby creating a wrong identity.
(D) ays in which personal information, stored in a data ban*, may become inaccurate are#

i. hen the data ban* is not updated regularly. 2f there should be a change of address and the
database in not updated, then the information about that individual becomes inaccurate

ii. !orruption of data by virus
iii. 2f the data ban* is not properly protected, then unauthori7ed persons can access and change
information in it.
Question "
(4) !onvert 8O
@9
to its binary e6uivalent.
(C) 4dd the two binary numbers @@9@9@
D
and @@@9@
D
, giving your solution in binary form.
(!) /ive the C!D representation of $:
@9
(D) /ive the C!D representation of )$:
@9
Solution
(4)

D 8O @
D U% @
D D@ @
D @9 9
D $ @
D D 9
D @ @
9
8O
@9
B@9@9@@@
D
(C)

@ @ 9 @ 9 @
D
E @ @ @ 9 @
D
@ 9 @ 9 9 @ 9
D
(!)
$ :
9@9@
D
@99@
D
$:
@9
B 9@9@ @99@ in C!D representation

(D) !onvert ()$:) using the twos complement method#

$:
@9
B 9@9@ @99@ in C!D
)$:
@9
B @9@@ 9@9@ @99@ 20 C!D Rthe @9@@ attached to the left represent the negative signS
Question #
(4) !D).-1s are used extensively in the field of education. <ate <&."" features of
educational software on !D).-1s that ma*e them useful for educational purposes.
(C) ,or "4!& of the following, state <- ways in which information <echnology can assist
employees in the performance of their =obs#
i. +aw enforcement
ii. 1edicine
iii. "ntertainment
Solution
(4) <hree features of educational software on !D).-1s are#

i. !Ds have a large storage capacity (at least $ gigabytes). <herefore they can hold a lot of
information
ii. Cecause it is .ead -nly, information cannot be altered or erased. 4s a result, mischievous
students are unable to change any information
iii. !Ds can record sound along with information. <he sounds and images are clearer and sharper
then if recorded on another medium e.g. a dis*ette.
(C) <wo ways information <echnology can assist the following employees in their =obs are#
L+. en-o('e2ent
i. (tore information about criminals. <his information includes, fingerprints, photograph, offences
to date and all other relevant information. ith the entrance of the persons name or fingerprint,
all relevant information about the person are available.
ii. <rac* delin6uent traffic offenders. ith the input of license number all traffic offences
committed by a person are made available.
Me*i'ine
i. Diagnosis systems that collect data and analy7e the data to diagnose the illnesses.
ii. (oftware that records and maintains patients record in databases
Ente(t+in2ent
i. ith the aid of computer technology a musician is now able to compose a song on the computer
ii. 1usical notes and sounds of different instruments can be stored and combined to give a pleasant
sound to the ear.
Question $
(4) rite a structured algorithm to read in <- numbers and print the higher value.
(C) rite a structured algorithm to interchange the values in <- variables 4 and C.
Solution
(4) read 0U1C@
read 0U1CD
if 0U1C@ B 0U1D then
5rint Gnumbers are e6ualI
endif
if 0U1C@F0U1CD then
5rint 0U1C@
else
5rint 0U1CD
endif
(C)
.ead 4
.ead C
! B 4
4 B C
C B !
Question 9
(4) !opy and complete the trace table below for the following algorithm.

Q B $
H B @9
(U1 B U$
hile (umJO$ do
(U1 B (U1 E H
5rint H
HB H E Q
"ndwhile
5rint (U1
Q H (U1
$ @9
D9 $$
$
(!) hat is printed by the algorithm3
Solution
(4)
Q H (U1 5.20<
$ @9 U$ @9
$ @$ $$ @$
$ D9 O9 D9
$ D$ :9
(C) <he following values of H would be printed# @9, @$, and D9.
Question 1%
rite a structured algorithm to read the names and scores of fifteen students in a class. <he
algorithm must print name of the students and his;her grade which is determined according to the
grading scale below. <he algorithm must also calculated and print the average score for the class.
/.4D20/ (!4+"

(!-." /.4D"
89 or more 4
?$ or more but less than 89 C
$9 or more but less than ?$ !
+ess than $9 ,
Solution
<-<(!-." B 9
,or !-U0< B @ to @$ Do
.ead 041"
.ead (!-."
<-<(!-." B <-<(!-." E (!-."
2f (!-." F B 89 then
/.4D" B 4
"lsif (!-." F B ?$ and (!-." J 89 then
/.4D" B C
"lsif (!-." F B $9 and (!-." J ?$ then
/.4D" B !
"lse
/.4D" B ,
"ndif
5rint 041", /.4D"
"ndfor
4>".4/" B <-<(!-.";@$
5rint 4>".4/"
1999
Question 1
4 computer consists of several hardware devices and software components. <he *eyboard, mouse
and printer are all peripheral devices connected to the systems unit. <he systems unit comprises of a
!entral 5rocessing Unit (!5U) and a component, (4), that holds the data and programs that are
currently being used. <he !5U in turn, consists of two components. -ne component, (C),directs the
internal operations within the !5UP and the other component, (!), is responsible for the
manipulation of data. 2n addition,, there is another storage component, (D),which stores data and
programs that are not currently being used by the !5U.
(tate the component that performs "4!& of the functions named 4 to D and underlined above.
Solution
<he components are#
4. .andom 4ccess 1emory (.41)
C. !ontrol Unit (!U)
!. 4rithmetic;+ogic Unit (4+U)
D. (econdary (torage
Question 2
1atch "4!& characteristic, listed 4 to & below with the 1-(< approximate device. rite the
letter (4,C, etc) to represent the characteristic and next to "4!& letter write the name of the device
that matches it.
CHARACTERISTIC 5EAICE
4. 1odulates and demodulates signals 5lotter
C. 4ccepts voice inputs Heyboard
!. 4llow users to input architectural plans 1odem
D. .eads in graphics data /raphics tablet
". Used for printing architectural plans 1icrophone
,. Used for entering text documents Carcode reader
/. .etrieves pricing data from grocery items Noystic*
&. Used to move the cursor (canner
Solution
CHARACTERISTIC 5EAICE
4. 1odulates and demodulates signals 1odem
C. 4ccepts voice inputs 1icrophone
!. 4llow users to input architectural plans (canner
D. .eads in graphics data /raphics tablet
". Used for printing architectural plans 5lotter
,. Used for entering text documents Heyboard
/. .etrieves pricing data from grocery items Carcode reader
&. Used to move the cursor Noystic*
Question 3
(4) (tate <&."" functions of an operating system.

(C) 2dentify the type of processing mode that would be suited for the following applications#
i. 1onthly payroll
ii. <ransactions at an 4utomatic <eller 1achine
iii. 5rocessing electricity bills
Solution
(4) <hree functions of an operating system are#
(i) 2t manages the sharing of internal memory among multiple applications
(ii) 2t handles input and output and from attached hardware devices, such as hard dis*s printers
and dial)up ports.
(iii) 2t provides security and control.
(C) (i) Catch processing
(ii) .eal time processing
(iii) <ransaction processing system
Question
(4) +ist <&."" ways in which a teacher can use computers in the classrooms.
(C) (uggest <- reasons why computers may 0-< be used in classroom.
(!) (tate <- advantages of using computers in the classroom.
Solution
(4)<hree ways in which a teacher can use computers in classroom are#

i. to teach students to use the computer
ii. to mar* scripts
iii. to use !omputer 4ided 2nstruction software
iv. to store students records
(C) <- reason computers may not be used in the classroom are#
i. not all students are computer literate
ii. the cost of computers and related software are still too expensive for some schools.
2ii. 0ot all teachers are computer literate
(!) <- advantages of using the computer in the classroom are#
i. students can learn at their own pace using !omputer 4ided 2nstruction software.
ii. teachers can spend more time with wea*er students while the faster students wor* with the
computer.
Question !
(a) !onvert the decimal number :9
@9
to a binary number.
(b) !onvert the binary number @@9@@
D
to a decimal
(c) 4dd the two binary numbers @@9@
D
and @9@9@
D
, giving your solution as a binary number.
(d) Determine the C!D representation of 8O
@9

Solution (4)

:9
@9
B @9@@9@9
D
(C)
@ @ 9 @ @
D
U
D
%
D
D
D
@
D
9
@@9@@
D
B D
U
E D
%
E D
@
E D
9
B @? E 8 E D E @
B DO
@9
(!)
@ @ 9 @
D
E @ 9 @ 9 @
D
@ 9 9 9 @ 9
D
(D)
O B 9@@@
8 B @999
8O
@9
B @9@@ 9@@@ @999 R the @9@@ attached to the left represents the positive signS
Question "
(a) (i) 2dentify -0" application of robots in industry.
(ii) (tate <- advantages of using robots in industry.
(iii) (tate -0" disadvantage of using robots in industry.
D :9 9
D U$ @
D DD 9
D @@ @
D $ @
D D 9
D @ @
9
(c) ,or "4!& of the following devices, state -0" application in which the use of the
device is
essential.
(i) (canner
(ii) 5lotter
(iii) 1odem
(iv) 1agnetic in*)character reader
Solution
(a) i. .obots are used to perform high electrode welding and wor*ing with machinery that are
dangerous, for e.g. presses and winders.

ii. <wo advantages of using robots in industry are#
reduction in the loss of human life
reduced wastage of material due to human error caused by fatigue or interruptions
reduced production time
reduction in cost of production
iii. <wo disadvantages of using robots in industry are#
wor*ers are displaced or unemployed
less investment in human labour leading to increased poverty among uns*illed
wor*ers.
(b) 5e?i'e A44li'+tion
(canner Des*top 5ublishing
5lotter 5rints maps and architectural drawings
1odem 2nternet use and electronic mail
1agnetic 2n*)character reader Can*ing, to read che6ue numbers
encoded at the bottom of the che6ues
Question #
(a) 2n order to secure its data, a company uses the following method for encrypting text#
4 letter is replaced by, five letters later in alphabetical order. ,or example, the letter G4I is replaced
by G,I, GCI is replaced by G/I and so on. 0ote that the letter G4I is considered to follow the letter
GLI.
(i) hat would the word G"((4MI be stored as 3
(ii) hat is the meaning of the following text3 0+<M0M
(C) (i) hat is the purpose of a password3
(ii) hat is meant by the term archiving3
(iii) ithin many organi7ations, data on personnel are stored in a central location from
which
various departments can access relevant information. (<4<" <&."" problems that may
arise because of the sharing of this type of data.
Solution
(a) i. "((4M would be stored as NQQ,D
ii. 0+<M0M means 2/-<2<
(b) i. 4 password is a special code, word or symbol that is re6uired to access a computer
system.
ii. 4rchiving is the storage of data no longer in use on tape or other durable mass storage
media for long term storage or bac*up.
iii. <hree problems that can occur are#
data can become incorrect or erased by deliberate tampering or human error
unauthori7ed persons could access the data for personal gain
violation of individuals privacy
Question $
5rograms are written with the general purpose of solving problems. &owever, it is unli*ely that a
program will run completely error)free on the first attempt. <he process whereby a program is
chec*ed to ensure that it does what it was designed for is important in the development of the
program. <here are two main types of errors that can occur# one type of error occurs when the
programmer fails to properly thin* through the solution to the problem and the other occurs when the
programmer does not ade6uately *now the rules of the programming language. 2t is good practice to
perform a manual trace on the program, using approximately selected input values, which chec*s
each segment of the program.
(tate the proper technical term of "4!& of the underlined phrases labeled 4 to "
Solution
4. Des* chec*ing or dry running
C. +ogical error
!. (tructured wal*through
D. <est data
Question 9
(a) D2,,"."0!" B 9
2nput 4, C
2f 4JBC then
D2,,"."0!" B 4)C
else
D2,,"."0!" B C)4
endif
print D2,,"."0!"
what is printed by the algorithm above if the input values are the following3
(i) D9 %9
(ii) @99 @99
(iii) $9 @9
(b) rite a structured algorithm to prompt the user to input two values which are then stored in 4
and C. <he algorithm must divide 4 by C and print the result. <he algorithm must *eep
prompting for the second number as long as the user enters 9 (Lero) for the second number.
Solution
(a) (i) )@9
(ii) 9
(iii) )U9

(b) 5rint G"nter two valuesI
2nput 4,C
hile C B 9 do
2nput C
"ndwhile
.esult B 4;C
5rint .esult
Question 1%
(i) rite a structured algorithm which prompts a user to enter an integer value which is then stored
in a variable 0. <he algorithm must then print each integer from @ to 0 and its corresponding
s6uare. "ach output line must show the integer and its s6uare. Mou may assume that the user
would enter an integer value .
(ii) 1odify the algorithm in (i) to determine the sum of all the s6uares. 5rint this sum if it is less than
or e6ual to @999. -therwise, print the following message#
THE S)M IS GREATER THAN ONE THO)SAN5
Solution
5rint G"nter >alueI
2nput 0
,or !ounter B @ to 0 do
5rint !ounter,!ounterK!ounter
"ndfor

(um B 9
5rinter G"nter >alueI
2nput 0
,or !ounter B @ to 0 do
5rinter !ounter, !ounterK!ounter
(um B (um E !ounterK!ounter
"ndfor
2f (um J B @999
5rint (um
"lse
5rint G<&" (U1 2( /."4<". <&40 -0" <&-U(40DI
"ndif
2%%%
Question 1
/ive -0" similarity and -0" difference between "4!& of the following pairs#
(a) .-1 and .4
(b) .-1 and "5.-1
(c) &ard Dis* and ,loppy Dis*
(d) 5rimary (torage and (econdary (torage
(e) (ystem software and 4pplication software
Solution
(a) Si2il+(it,0 .-1 and .41 are both memory chips
5i--e(en'e0 .41 is volatile and .-1 is not
(b) Si2il+(it,0 2nformation on the .-1 and "5.-1 chips is only for the computer to use
5i--e(en'e0 2nformation on the .-1 chip is permanently stored, information on "5.-1 can be
erased and new instructions written to it.
(c) Si2il+(it,0 Data stored on ,loppy Dis* and &ard Dis* can be accessed without reading any other
data item first(D4(D).
5i--e(en'e0 ,loppy Dis*s are removable, &ard Dis*s cannot be easily moved from place to place.
(d) Si2il+(it,0 <hey store data for processing.
5i--e(en'e0 5rimary storage is volatile, and secondary storage is not.
(e) Si2il+(it,0 Coth are instructions carried out by the computer
5i--e(en'e0 4pplication software is used by end user to solve specific user problems while
(ystem software is used by the computer to manage its activities.
Question 2
(a) /ive brief explanations for "4!& of the following terms#
(i) ordsi7e (ii) Cuffer
(iii) 1icrofilm (iv) Candwith
(v) ide area networ*
(b)
(i) hat is electronic eavesdropping3
(ii) hat is software piracy3
(iv) (tate <- ways in which software piracy may be controlled.
Solution
(a) (i) <he number of bits that is handed by the computer as a unit.<he unit could represent an
instruction or data element.
(ii) <emporary storage area for data. <he purpose of the buffer is to act as holding area for
data that has been processed by the !5U and waiting to be transmitted to a device, thus
freeing the !5U to continue its processing function.
(iii) 4 high resolution film on which photographic records are *ept of documents or other
material, in greatly reduced si7e. <o read the information a special optical viewer must
be used to enlarge the information on the microfilm for viewing.
(iv) <he amount of data that can be sent through a networ* connection, measured in bits
per second (bps)
(v) 4 networ* in which computers are connected to each other over a long distance, using
telephone lines and satellite communications.
(b) (i) +in*ing into telecommunication channels to access information.
(ii) (oftware piracy is the illegal copying of software.
(iii) (oftware piracy can be controlled by the following methods#
the use of passwords that allow only authori7ed persons to access and use software.
(etting up laws which punish persons who engage in software piracy.
Question 3
riting a program to solve a problem.
Cefore writing a program in high level language, it is advisable to write an algorithm that solves the
problem. <his algorithm can be written in pseudocode and tested thoroughly for logic errors.
5erform a dry)run of the algorithm using a wide variety of test data to ensure that your algorithm
wor*s for all possible cases. 0ext, convert your algorithm to the high level language. !ompile your
program and correct any syntax errors which you may have. .un your program an use the same set
of test data you used for the dry)run, if you get the same results, your program is wor*ing correctly.
"xplain the meanings of "4!& of the underlined terms.
Soution
Hi/& le?el l+n/u+/e is one that is more intelligible to human beings and, before it
can be understood by the machine it has to be converted to a form that the ! machine
can understand.
>seu*o'o*e is a form of representation used to provide an outline description of the
specification for a software module.
Lo/i' e((o(s are errors that occur when the programmer fails to properly thin*
through the solution to a program. 4 *(,9(un is the execution of a program for
purposes of chec*ing that the program behaves correctly rather than for producing
useful results.
<o 'o24ile a program is to translate the entire source code (all statements) to its
ob=ect code before execution ta*es place.
S,nt+B e((o(s occur when the programmer does not ade6uately *now the rules of
the programming language.
Question
<he 2nsure 0ow 2nsurance !ompany has its head office in Cridgetown, Carbados, <he company has
one computer, on which it stores all company data. <he company handles a lot of confidential client
data. "ach client is assigned to a particular agent. Mou do not want agents to see confidential
information about other agents clients.
(a) &ow can you prevent agents from viewing one another confidential files3
(b) (tate <- precautionary measures which can be ta*en to ensure that in the case of a fire, all
client data is preserved.
Solution
(a) 4gents can be prevented from viewing each others files by giving each agent a
password that
can be used to view their file only, preventing others from doing so.

(b) <- precautionary measures are#
the use of fire proof cabinets to store data
copy all documents and store them in a building away from yhe present location of
the business.
Question !
(a) hat is GteleconferencingI
(b) (tate <- advantages of teleconferencing.
(c) (tate ,-U. hardware re6uirements for teleconferencing.
Solution
(a) Tele'on-e(en'in/ is the means by which participants are able to conduct
interactive electronic
meetings between one or more distant locations.
(b) <- advantages of teleconferencing are#
<he cost for traveling is reduced as participants can remain where they are, not
traveling long distances.
<he time for traveling is reduced.
(c) ,our hardware re6uirements for teleconferencing are#
<elephone
1odem
(pea*ers
1icrophone
Question "
(a) (i) (tate -0" advantage of machine language over a high level language.
(ii) (tate <- advantages of a high level language over machine language.
(b) (tate <&."" advantages of computer networ*s.

Solution
(a) (i) 0o translation is necessary for computer to execute the instruction.
(ii) ' &igh level language is more intelligible to human beings than machine language.
) 5rograms written in high level language are portable, that is they can be used on other
machines with little or no modification.
(b) (i) 2nformation can be shared between computer terminals .
(ii) !osts can be reduced as scanners, printers etc., can be shared.
(iii) .eduction in paper cost and telephone cost because electronic mail can be used as a
communication tool.
Question #
(a) !onvert ::
@9
to its binary e6uivalent.
(b) 4dd the two binary numbers @@9@9@
D
and @@9@@
D
, giving the solution in decimal form.

(c) "xplain how an integer could be represented using C!D.
(d) /ive the C!D representation of )?$
@9
Solution
(a)
D :: @
D U: @
D DU 9
D @D 9
D ? 9
D % @
D @ @
9
::
@9
B @@999@@
D
(b)
@ @ 9 @ 9 @
D
E @ @ 9 @ @
D

@ 9 @ 9 9 9 9
D
Con?e(tin/ 1%1%%%% to *e'i2+l -o(2
@ 9 @ 9 9 9 9
D
?
D
$
D
U
D
%
D
D
D
@
D
9
B D
?
E D
U

B ?U E @?
B 89
@9
(c) e convert an integer in its C!D representation by#
@. !onverting each digit in the integer to its binary value using a four bit coding scheme.
D. Noining the four bit representation of each bit in the same order as the integer
%. if the integer is negative attach @9@@ to the left of the bit string to indicate that the number
is negative or @9@9 to the left of the bit string to indicate that the number is positive.
(d)
? $
@9@@ 9@@9 9@9@
<he C!D value of )?$ is @9@@9@@99@9@
Question $
(a) rite an algorithm which reads three values, a,b and c and prints the largest of all
three
(b) <his part is based on the algorithm given below.
set 4 to %
set C to $
set (U1 to @
while 4JB$9 do
4B 4EC
CB CE4
(U1B (U1 E C
"ndwhile
5rint (U1
(top
Using the algorithm above
(i) copy and complete the trace table which follows#
A C S)M
% $ @
(ii) (tate what is printed by the algorithm
Solution
."4D a
."4D b
."4D c
2f a B b and a B c then
5rint G0umbers are e6ualI
"ndif
2f a F B b then
+argest B a
"lse
+argest B b
"ndif

2f c FB largest then
+argest B c
"ndif
5rint largest.
(b) i.
4 C (U1
% $ @
8 @% @U
D@ %U U8
$$ 8: @%O

ii. @%O
Question 9
rite an algorithm to read a positive integer 0 and find the average of all even numbers between @
and 0 inclusive. 5erform any necessary validates.
Solution
.ead 0
if 0 J B 9 then
print G2nvalid "ntryI
else
(U1 B 9
0U1 B 9
!-U0< B 9
while (U1 J B (0)@) do
(U1 B (U1 E D
!-U0< B !-U0< E @
endwhile
">"04>/ B (U1;!-U0<
endif

Question 1%
rite an algorithm to read the names of @9 items and their price and print the name of the item with
the highest price. 4ssume that no items have the same price. Data is supplied in the form# 2tem @,
price @, price D, etc
Solution
read item
read price
hprice B price
hitem B item
for !-U0<". B @ to : do
read item
read price
if price F hprice then
hprice B price
hitem B item
endif
endfor
print G&ighest item with highest priceI, hitem
2%%1
Question 1
(a) ,ortrans was the first third generation language. hat are the features distinguishing the third
generation from the first T second generation3

(b) /ive the meaning of the followingP
i. +ogic
ii. <est data
iii. (ource code
iv. >ariable
(c) hat are the responsibilities of the !hief 5rogrammer3
Solution
(a) <he features distinguishing the third 'generation languages from the first and second
generations are#
<hird generation language uses words, sentences and mathematical formulas, while
first generation uses ones and 7eros. second generation language uses assembly
language.
<hird generation language has a special way of organi7ation program instructions
*nown as a syntax.
<hird generation language in comparison to first and second generation languages is
easier for human to understand.
(b)
Lo/i' e((o() 4n error caused by a mista*e in programming instructions. 4 logic
error causes a program to operate wrongly or produce incorrect results but does not
stop the program from wor*ing.
Test *+t+ ' 4pproximately selected input data for testing computer systems to
ensure that it fulfills the purpose for which it was created.
Sou('e 'o*e) (ource code is a program written in a high level programming
language.
A+(i+6le ' 4 named storage location in memory where data is stored temporarily
during program execution and whose content constantly changes.
(c) <he responsibilities of the !hief 5rogrammer are#
@. co)ordinates programming tas*s among programmers
D. leads and guides programming pro=ects
%. writes computer programs
Question 2
rite down what "4!& of the following abbreviations stand for, and what is the purpose of "4!&
of the components listed3
(a) 5.-1
(b) !5U
(c) 4+U
(d) .41
Solution
(a) >ROM9 programmable .ead -nly 1emory ' has no data on it when first manufactured.
!omputer manufactures then place the information on the chip, and when this is
done the chip becomes read only.
(b) C>) ) !entral 5rocessing Unit)this is where all processing ta*es place. 2t interprets and
executes program instructions as well as, communicates with input, output and
storage devices.
(c) AL)) 4rithmetic and +ogic Unit 'performs
1 all arithmetic operations
1 all logical operations
1 stores the data which can be immediately processed by the program
2nstructions.
(d) RAM9 .andom 4ccess 1emory#
1 stores program instructions prior to execution
1 stores the data which can be immediately processed by the program
instructions.
1 stores information temporarily after processing is complete.

Question 3
(a) "xplain the difference between data and information.
(b) "xplain the following terms
(i) U5+-4D
(ii) 40
(b) hich of the following are of serial)access type3
(i) 1icrofilm
(ii) 1icrofiche
(iii) .eel)to)reel tape
(iv) !artridge tape
Solution
(a) <he difference between data and information is#
Data is raw, unprocessed fact. 2nformation is processed or interpreted data that can be used.
(b) (i) )>LOA5) <he transfer of files from one computer to a mainframe or a server via a
networ* such as the internet.
(ii) @AN) ide 4rea 0etwor*, group of networ*s connected over a large geographic
area such as city, country or continent.
(c) <he following storage media are serial access#
(iii) .eel)to)reel tape (iv) !artridge tape
Question
(a) -utline the <&."" main functions of a computers operating system
(b) &ow does a pull)down menu help you in completing your tas* more easily3
(c) /ive the 1-(< important advantage of primary storage over secondary storage.
(d) /ive the 1-(< important advantage of dis* storage over tape storage.
(e) 2n using dis*ettes, one precaution is G*eep dis*ettes away from magnetic
fields.I
/ive <&."" further precautions in the use of dis*ettes to store files.
Solution
(a) <&."" main functions of the computers operating system are#
(i) !ontrols program execution
(ii) &andles input and output to and from attached hardware devices
(iii) 1anages data and file storage
(iv) 4ssigns different tas*s to the !5U
(b) 4 pull down menu helps in completing tas*s more easily by providing the user with a list of user
friendly commands, that can be executed by simply clic*ing the command.
(b) <he access time for primary storage is faster than that of secondary storage
(c) Dis* storage allows 6uic*er retrieval of data because it is direct access media.
(e) <&."" further precautions in handling dis*ettes are#
(i) Do not bend the dis*ette
(ii) 0ever touch the recording surface of the dis*ette
(iii) Heep the dis*ette away from heat surfaces
(iv) Do not remove or insert dis*ette if the drive light is on
(v) Do not write on dis*ette except with soft tip pen
Question !
(a) hich print output devices is best suited for printing an architectural drawing of the front
view of a new building, and why3
(b) 4 dot matrix printer is producing very faded output. /ive -0" li*ely reason for this
problem, and explain what must be done to remedy it.
(c) "xplain the operation of the light pen.
(d) /ive -0" similarity and -0" difference between -!. and 12!..
Solution
(a) <he printer output device that is best suited for printing an architectural drawing of
the front
view of new building is a plotter. 4 plotter produces large si7ed documents by using special
mechanism to draw lines that constitute a document.
(b) 2f a dot matrix printer is producing very faded output it could be that the in* on the
ribbon is finishing and the ribbon needs to be re)in*ed or replaced.
(c) 4 light pen detects the presence and absence of light on a surface. <his information sent to the
computer that interprets it.
(c) -0" similarity and -0" difference between -!. and 12!. operation is that

(imilarity ' both read and convert text into electrical signals that are converted to character by
the computer.
DifferenceZ<he 12!. reads only magneti7es or magnetic characters.

Question "
(a) 4 certain computer uses an unsigned binary floating point representation for positive real numbers.
<he mantissa is an 8)bit normali7ed fraction and the exponent is an 8)bit, twos complement integer
2n a particular case, the mantissa is @99@99@@ and the exponent is 99@@99@@. what is the number
being represented3
(b) !onvert the binary number 9@9@9@9@ to decimal number
(c) !onvert the decimal number O (seven) to a binary number.
Solution
(a) <he number being represented is
@.@99@99@@K D
99@@99@@
B@.@99@99@@K D
$@
B(@KD
9
E @K D
)@
E @K D
)U
E @K D
)O
E @K D
)8
)KD
$@
B(@KD
8
E @KD
O
E @K D
U
E @K D
@
E @K D
9
)KD
U%
B (D$?E@D8E@?EDE@)KD
U%
B U9% K D
U%
(b) <he decimal value of 9@9@9@9@ is#
9 @ 9 @ 9 @ 9 @
@D
8
?
U
%
D
@
?
8 U D @
?U E @? E U E @ B 8?
(c) <he binary value of the decimal number O is#

D O @
D % @
D @ @
9
99999@@@
D
Question #
(a) <he use of information for strategic purposes can sometimes involve a violation of ethics. /ive
<- ways in which this statement is true.
(b) 2n dealing with computer security, explain -0" advantage of software restrictions compared with
physical restrictions.
(c)hat is telecommuting3 what ma=or development has contributed to ma*ing telecommuting a
,easible option3
Solution
(a) <- ways in which the statement is true is#

i. !ustomer information is distributed or sold without their *nowledge to individual;company who use
the information for strategic purposes.
ii. 2nvasion of privacy by the monitoring of electronic mails of millions of customer whose data are
stored in private and public databases. <hen using the information gathered to assist in strategic
planning of product output.
(b) (oftware restriction prevents access of information in any location. 5hysical restriction =ust
prevents physical contact with the software. 2f the barrier is bro*en, the information may be
acessessed.
(c) <elecommuting is wor*ing at home by sending information (via phone, fax and computer) from
home to the office. <he ma=or developments that have contributed to ma*ing telecommuting
a feasible option are#

(i) <elephone (ii) 1odem (iii) <he 2nternet (iv) ,ax 1achine
Question $
<he following terms relate to memory and data storage. /ive the meaning and purpose of "4!&
(a) Cac*ing up
(b) .ead;rite head
(c) 4ddress
(d) 4ccess time
Solution
.elation to memory and storage#
(a) C+'7in/ u4) <he routine activity of duplicating computer files or database on
secondary
secondary storage media. <his is done to preserve information in the case of data destruction
because of e6uipment failure or other catastrophe.
(b) Re+*3@(ite &e+*9 4 read;write head is the device that reads data from and writes
data ontoa
storage medium in magnetic pattern.
(c) A**(ess) 4 uni6ue number that references a location in computer memory.

(c) A''ess ti2e) the time for the read;write head to move to the correct trac* plus the
time for
half a complete rotation of the dis* platter.
Question 9
!onsider the following#
205U< Q,M,L
M B Q E M
Q B Q ' M
M B Q E M
2, Q F M <&"0
L B Q)M)L
"+("
LB QEMEL
"0D2,
5.20< Q,M,L
hat is printed by the algorithm if the input is#
(a) @,@,@3
(b) @,D,%3
Solution
(a)
Q M L
@ @ @
)@ D @
@
t&e -ollo.in/ is 4(inte*0 918181
(b)

Q M L
@ D %
)D % D
@
T&e -ollo.in/ is 4(inte*0 928182
Question 1%
4 certain account at a ban* earns compound interest on a yearly basis, and has no deposits or
withdrawals. <he balance after a year is given by the formula#
<his years CalanceB +ast Mears Calance K( @ E 2nterest .ate), where 2nterest .ate is given as a
decimal fraction.( for example, D$W must be entered as 9.D$)
rite a structured algorithm to do the following#
(a) .e6uest the user to provide the interest rate as a decimal, the number of years to
compute interest
for and the starting balance.
(b) .ead in the interest rate ., and the value 0 which is the number of years to
compute interest for.
(c) .ead in the starting balance.
(d) !ompute and display the balance, including the interest, after 0 years have
passed
Solution
5rint G"nter the interest rateI
.ead (.)
5rint G"nter the number of years to computer interest forI
.ead (0)
5rint G"nter the starting balanceI
.ead (+astYMearYCalance)
,or counter B @ to 0 do

<hisYMearYCalance B +astYMearYCalance K(@ E .)
+astYMearY Calance B <hisYyearYCalance
"ndfor
5rint G<he balance after #I,0, Gyears is # G,<hisYMearYCalance
5rint G<he interest rate# G,.
2%%2
Question
(a) 0ame the <- main component of the central 5rocessing Unit.
(b) ,or the two component named in part (a),discuss their 1420 functions.
(c) /ive -0" difference between 5.-1 and "5.-1
(d) hat is half)duplex transmission
Solution
(a) <he <- main component of the !entral 5rocessing Unit are#
2. <he !ontrol Unit
22. <he 4rithmetic ;+ogic Unit (4+U)
(b) <heir 1420 functions are#
T&e Cont(ol )nit
.eads and interprets program instruction
Directs the operation of the internal processor component
!ontrols the flow of programs and data in and out of primary memory
!ontrols the flow of information to and from 2;- devices
T&e A(it&2eti'3Lo/i'+l )nit (AL))
5erforms all arithmetic operations
5erforms logical operations
(tores the data which can be immediately processed by the program instructions
(c) -0" difference between 5.-1 and "5.-1 is that once an instruction is
written on a 5.-1 chip it cannot be erased. "5.-1, on the other hand , can
be programmed electronically at any time and can be erased with ultra violet
light.
(d) &alf)duplex transmission is the transmission of data on only one direction at
any given time.
Question 2
(a) you have saved a file on dis*ette. Mou later find that although you see the file
listed, you cannot
open the file from the dis*ette. /ive -0" possible cause for this problem
(b) -ne of the things done in high level format is the creation of a ,ile 4llocation
<able. hat is the
purpose of the ,ile 4llocation <able3
(c) "xplain how a fixed)head system on a hard dis* unit can reduce the access time
for the device.
(d) ith reference to a hard dis* arrangement, give the difference between a trac* and a cylinder.
(d) 4 hard dis* system has six dis* surfaces, with one moving head for each
surface. 4 certain trac*
has ten sectors forming a ring, each sector carrying [ H)byte. &ow many
i) bytes are there in each [ H)byte sector3
ii) H)bytes are there in the entire cylinder3
Solution
(a) <he Dis*ette may have damaged sectors.
(b) <he file allocation table (,4<)#
+ists all of the clusters available on a dis*
Heeps trac* of which clusters belong to which file as files may be scattered all over a
dis*
+ocates each cluster and determines whether it is damaged in use or available for use
(!) 4ccess time is e6ual to the time for the read;write head to move to the correct trac* plus the time
for half a complete rotation of the dis* platter. ith a fixed head system the time to locate the
trac* is eliminated because each trac* has it own read;write head.
(e) <he difference between a trac* and a cylinder is that a trac* is a circular ring on
one side of the
dis*, while a cylinder is a set of corresponding trac*s running vertically through the dis* pac*.
(")

2. [ H)byte B@9DU;D bytes B $@D bytes
22. @9K .$K? B%9H)bytes per cylinder
Question 3
(a) 4n old %9) pin memory module ((211) was capable of providing one byte at a time
to the !5U. 4 %D) bit machine would re6uire four of these to wor* together in a
single ban*. "xplain why is this so.
(b) 2ntegers are good for representing discrete data. .eal numbers and floating point
values are good for representing continuous data. "xplain these statements.
Solution

(a) @ Cyte B 8 Cits
%D Cits is therefore e6ual to %D;8 B U Cytes.
,our of the old %9)pin memory module ( (211) would be needed because each represents
one byte of data.
(b) 2ntegers are whole numbers and do not have a decimal part , discrete data vary in
distinct
steps and is therefore suitably represented by integers. .eal numbers and floating point
value do not vary in distinct steps but change smoothly and continuously over a range.
<hey are therefore used to represent continuous data, that is, data that is related to a scale
of measurements where there is always an additional data point between any two ad=acent
points.
Question
(a) "xplain why magnetic tape is a serial access medium.
(b) "xplain why a floppy dis* is considered a direct access medium.
(c)hat is 1icrofilm3
Solution
(a) 4 magnetic tape is a serial access medium because all data between the persent
position of the read;write head and the re6uired data has to be passed over the data can
be accessed.
(b) 4 floppy dis* is considered a direct access medium because it allows re6uired data to be
accessed directly without reading any other data item first
(c) 4 high resolution film on which photographic records are *ept of documents or other
material, in greatly reduced si7e. <o read the information a special optical viewer must be
used to enlarge the information on the microfilm for viewing.
Question !
(a) /ive two applications for the use of -ptical 1ar* .eader (-1.).
(b) /ive two meanings of the abbreviation -!..
(c) "xplain why a monitor screen specified as G @9DUK O?8I is expected to give a clearer
picture than one specified as G ?U9KU89I
(d) /ive one advantage and one disadvantage of a touch as compared to the use of the mouse.
(e) /ive the difference between G custom softwareI and G customi7e software.I
Solutions
(a) 4pplication for -1. includes the following#
2. <he mar*ing of multiple choice papers
22. <o read information collected on mar*et research 6uestionnaires
222. 2n supermar*et for reordering stoc*.
(b) <wo meanings for the abbreviation -!. are -ptical !haracter .ecognition and
-ptical !haracter .eader.
(c)<he monitor screen of G @9DUK O?8I has more dots or pixels per inch and is therefore
able to produce more detailed images and thus gives a clearer picture than the G?U9K
U89I screen.
(d) 4dvantages# ) re6uires less eye and hand coordination
) does not re6uire the fine movements of using a mouse
) re6uires less des* space
Disadvantages# ) fingers are bigger than cursors and therefore each option re6uires
more screen space.
) may become tiring if a lot of options have to be selected.
(e) !ustom software is software specially created to serve the needs of a specific
2ndividual or company. !ustomi7ed software is general software that can be modified by the
customer to better serve his personal needs
Question "
(a) Using an 8) bit binary representation, give the
binary representation for the decimal number @9
ones complement representation for the decimal number negative @9
twos complement representation for the decimal number negative @9
sign and magnitude representation for the decimal number negative @9
(b) Using even parity with an 8) bit data byte, where the leftmost bit is to be used as the
parity bit,which of the following are valid bit patterns3
99999999
999999@@
999999@9
@999999@
Solution
(i)
D @9 9
D $ @
D D 9
D @ @
9

@9
@9
B 9999@9@9
D
(ii) <he ones complement representation for the decimal number negative @9 is#
@@@@9@9@R we change all the ones to 7eroes and all the 7eroes to ones


(iii) <he twos complement representation fot the decimal number negative @9 is#
@@@@9@9@
E@
@@@@9@@9
(iv) (ign and magnitude representation for the decimal number negative @9 is#
@@@@@9@9@
(b) 2 >alid
2i >alid
2ii 2nvalid
2v >alid
Question #
(a) 1r. Ns basic computer system has a monitor, *eyboard, system unit, mouse and
modem. /ive two additional devices that would enhance each of the following#
i. /ame 5laying
ii. <eleconferencing
iii. 5resenting a report
(b)"xplain the difference in operation between a line printer and a character printer.
Solution
(a) i. /ame 5laying) Noystic*, /ame pads
ii.<eleconferencing) ebcam, 1icrophone
iii.5resenting a .eport) 1ultimedia pro=ector, (pea*ers
(b) <he difference in operation between a line printer and a character is, line printer
prints much faster than a character printer. !haracter printer prints one
character at a time using an impact technology and are therefore noisy. <he line
printer prints a line at a time using either a laser or in*=et technology and are
therefore very 6uiet and much faster than a character printer.

Question $
(a) /ive two reasons why someone might =oin the newsgroup
(b) "xplain the ma=or difference between internet relay chat and electronic mail
(c) /ive the meaning of the following abbreviations, and for each case, explain the
purpose#
2 &<1+
22 ,<5
222 !4DD
Solution
(a) @. <o participate in discussion of a particular interest or distance learning.
D. <o publish personal literary or artist wor* so as to solicit feed bac* from a wide cross)
section of individual.
(b)<he ma=or difference between internet relay chat and electronic mail is that the 2.! allows
two or more persons to participate in interactive real time discussion on a specific topic via
the internet while email does not allow for real time interaction and you can send messages
on any topic imaginable to an individual or group.
(c) i. &<1+) &yper <ext 1ar*up +anguage) a programming language used to create
web pages.
ii. ,<5) ,ile <ransfer 5rotocol) ,<5 is a set of rules for communication over the
internet that enables you to locate a file stored on a computer or server elsewhere
and retrieve the file and either view it or save it to your computer. 2t 4lso enables
an individual to transfer files from their computer to a computer somewhere else
iii, !4DD) !omputer 4ssisted Design and Drafting) facilities the use of
computer to produce drawings(DD and %D) that would normally be prepared
manually.
Question 9
(a) 4 large company offers free transportation or a transport allowance to its employees.
,or this purpose it has prepared a list of the names and addresses of employees. 2n those
areas with many persons needing a transport, the company provides transportation.
i. Cesides name and addresses, -ne of the other item of information that might
be desirable in this case .
ii. "xplain one way in which the information here might be misused.
(c) 4 foreign university *eeps records of past students performance on a computer database.
<he entired building is destroyed by fire, along with the records. /ive two methods that
might have been used to allow the record) *eeping to continue.
Solution
(a) i. Cesides name and addresses, one other item of information that might be desirable in
this case is the person telephone number or email address.
ii. -ne way in which the information collected here may be misused is if the individuals
personal information is use for other purpose than that which it was intended without the
persons permission.
(b) @. use of a fire proof cabinet
D. use of a U(C ,lash Drive; !D Curner; <ape Drive to create copies the data that is
stored in a safe off site place.
Question 1%
(a) "xplain the term electronic eavesdropping.
(b) 2n the case of an encrypt file, what is the purpose of a password3
(c) /ive two typical responsibilities of a networ* manager.
Solution
(a) "lectronic eavesdropping is the intentional surveillance of data) voice, data, fax, email,
mobile telephones etc, often for dishonest purposes.
(b) 2n the case of an encrypted file, the purpose of a password is to grant access to decrypted
the file to authori7ed persons.
(c) @. 1onitor the networ*s performance
D. <rouble) shooting of problems encountered by the users of the networ*
%. <o grant access rights to employees.
Question 11
rite an algorithm or program to read in two numbers and find the average of the
numbers.
Solution
.ead 0umb @
.ead 0umb D
4verageB ( 0umb@ E 0umb D);D
Question 12
rite an algorithm to read the names and prices of @99 items, and print the names of
those items with price being lee than fifty dollars.
Solution
,or counter B @ to @99 do begin
.ead item) 0ame
.ead 5rice
2f 5rice J $9.99 then
5rint 2tem) 0ame
"nd 2f
"nd ,or
Question 13

4 concert organi7er wants to charge different entrance prices as follows#
1ales over the age of fifteen pay \$9. ,emales over fifteen years old pay \U9. ,emales
fifteen years old or younger must pay \D9, males firteen and under pay \%9. 0o person
under two is allowed. rite a program or algorithm to read the name, age and sex of each
patron, and for each person, to print out the names and entrance fee. <he program must
stop when it encounters a person named G"0D.I
Solution
.ead name
.ead age
.ead sex
hile nameJF G"0DI Do Cegin
2f ageF@$ and sex B G 1aleI then
5rint name
5rintI\$9.99I
"nd 2f
2f 4ge F @$ and sex B G,emalesI then
5rint name
5rint G\U9.99I
"nd 2f
2f ageJB @$ and age FBD and sex B G 1alesI then
5rint name
5rint G\%9.99I
"nd 2,
2f age JB @$ and age FBD and sex BI,emalesI then
5rint name
5rintI \D9.99I
"nd 2f
2, age JD
5rint G 5ersons under two years of age not allowedI
"nd 2f
.ead name
.ead age
.ead sex
"ndwhile
Question 1
(a) !opy and complete the following trace table, for the algorithm.
Q M L
@ D %
U
<he algorithm#
QB @
M BD
L B %
L B LE Q
Q B L)Q
M B LEM
L B M)L
M B M)Q)L

5rint Q, M,L

hat is finally printed by the algorithm3
Solution
(a)

Q M L 5rinted
@ D % %,@,D
% ? U
@ D
(c) <he following is printed by the algorithm#
%,@,D
2%%3
Question 1
(a) +ist <- advantages of secondary storage for long term storage of data, as compare to using
the computers main memory.
(b). i. 2dentify <- input devices that are regularly used at point)of)(ale <erminals, and briefly
describe how they function.
ii. +ist <- locations at which point)of)(ale <erminals are helpful.
(c) "xplain the difference between data and information
(d) (tate one similarity in the operation of -ptical 1ar* .eaders and barcodes.
Solution
(a) i. (econdary storage is non)volatile and therefore more permanent
ii. +arger amounts of data maybe stored using secondary storage than the main memory.
iii. (econdary storage is less li*ely to be lost by virus attac*s and therefore more secure.
(b) i. C+('o*e Re+*e() <he barcode reader contains a scanning device that scans the
information contained on the barcode of a product and sends it to the computer. <he
barcode reader contains a decoder that analy7es this information before it is sent to the
computer.
)De,6o+(*9 2nformation is sent to the !5U by pressing the *eys on the *eyboard the
pressing of the *ey generates a code that represents the character associated with the *ey.
<he code is sent to the !5U for processing.
)C(e*it3*e6it '+(* (e+*e( ) <he reader pic*s up the information contained on the
magnetic strip on the bac* of the card and sends it to the computer.
ii.+ocations at which point)of)sale terminals are helpful are#
).estaurants )/as (tation )(upermar*ets )!lothes (tore
(c) Data is raw facts and figures collected by an individual or organi7ation. 2nformation is
defined as data that have been processed and analy7ed in a formal, intelligent way.
(d) Coth detect the presence or absence of a mar*.
Question 2
(a) 4 computer user suspects that the laser printers toner cartridge is about to run out.
(uggest -0" way in which the user can tell whether or not the toner is about to finish.
(b) 2n handling dis*ettes, one precaution is G*eep dis*ettes away from li6uidsI. /ive
<&."" further precautions to be ta*en in the handling of dis*ettes.
(c) <apes storage involves G(erial 4ccessI. Criefly, explain the meaning of the term (erial
access, highlighting and disadvantage that this *ind of access may have.
Solution
(a) @. -ne way in which the user can tell whether or not the toner is about to finish is to
note the print 6uality of the printer. +aser printers have high print 6uality therefore, if
the prints is faded one can conclude that the toner is about to finish.
OR
D. <he status of the toner cartridge will be displayed on the computer screen or for some
printers on the printers display screen.
(b) i. Heep dis*ettes away from magnetic fields such as telephones or electric motors.
ii.Do not expose dis*ettes to direct sunlight for prolonged periods.
iii.Dont insert or remove a dis*ette from a dis* drive if the Gdrive activesI light is on.
(c) (erial 4ccess involves writing to or reading information from a storage device in
se6uential order. <he disadvantage of this *ind of access is the high access time as all
data occurs before the re6uired data has to be read.
Question 3
!omplete the following paragraphs, using the terms supplied in the listing below. +2(< -,
<".1( (some orall may be used)# +(it&2eti' +n* lo/i' unit8 6+'7in/ sto(e8 'ont(ol unit8
',lin*e(s8 &e+*s8 inte(n+l 2e2o(,8 4(o/(+28 se'to(s8 t(+'7s1
(a) 2n order to execute a (A) which is stored on the computer, the computer must read
the instructions from its (C) into its (C) the (5) then pic* each
instruction in turn, passing any mathematical or logic operations over the (E) until the
entire se6uence is completed.
(b) <he data stored on a high density % [ inch dis*ette is arranged in 89 circular (F) forming
rings on the surface of the dis* each ring is divided into @8 (G) having [ *)bytes each a
hard dis* has multiple surfaces. <he corresponding rings on those surfaces are directly above and
below each other, -n a hard dis*s, these rings, one above the other, are said to form (H) 1
(a) 2n order to execute a (A)>(o/(+2 which is stored on the computer, the computer must read
the instructions from its (C)6+'7in/ sto(e into its (C)Inte(n+l Me2o(,. <he E(5)'ont(ol unit
then pic*s each instruction in turn, passing any mathematical or logic operations over to the
(E)+(it&2eti' +n* lo/i' unit until the entire se6uence is completed.
(b) <he data stored on a high density % [ inch dis*ette is arranged in 89 circular (F)t(+'7s
forming rings on the surface of the dis* each ring is divided into @8 (G)se'to(s having [ *)byte
each. 4 hard dis* has multiple surfaces. <he corresponding rings those surfaces are directly
above and below each other. -n a hard dis*, these rings, one above the other, are said to form
(H)C,lin*e(s.
Question
(a) ith regard to data storage, what is the difference between a byte and a word3
(b) "xplain the difference between odd parity and even parity.
(c) ith respect to information being read from a hard dis*, what is the purpose of a CU,,".3
(d) (uggest -0" use for which a D>D is more suitable than !D.
(e) <he information contained in .-1 (.ead -nly 1emory) cannot be changed. hat is the
purpose of the .-13
Solution
(a) ith regard to data storage, a byte for micro computer represents eight bits used to store or
represent a single character. 4 word is usually a multiple of bytes. ,or example D bytes (@?bits),
U bytes (%Dbits) or 8 bytes (Ubits).
(b) E?en >+(it,) 2f a character or number is stored as a pattern of bits that contains an odd
number of ones, a @ Kthe parity bit) is added to ma*e the number of ones an even number. hen
the bit not even, an error is reported and the bit pattern declared corrupt.
O** >+(it,) (imilar to "ven 5arity in that if a bit pattern contains an even number of ones
the parity bit ma*es it odd with the same results at the receiving end.
(c) A Cu--e( is an internal memory area used for temporary storage of data read from a hard dis*
during data retrieved operation.
(d) -ne use for which a D>D is more suitable than a !D is for storing movies.
(e) <he information contained in .-1 (.ead -nly 1emory) cannot be changed. <he purpose of
the .-1 is to store instructions and data permanently. .-1 is typically used to store things that
will never change for the life of the computer, such as low level portions of an operating system.
Question !
(a) "xplain briefly what is meant by Gthe resolution of visual display unitI.
(b) hat is
i. 5oint)to)point transmission
ii. 4 voice response unit
iii. 4 bulletin Coard.
Solution
(a) <he resolution of a visual display unit is the number of pixels or dots hori7ontally and
vertically on a monitor screen and corresponds to the clarity and sharpness of the image that the
unit is able to display. <he denser the array of dots the better the resolution.
(b) i. >oint9to9>oint t(+ns2ission) is communication between two designed stations only.

ii. A Aoi'e (es4onse unit) a type of voice synthesis that forms sentences by lin*ing pre)
recorded words from a database.
iii.A Culletin Co+(*) is a central on)line community similar to a wall mounted bulletin board
that, allow uses in computer networ* to exchange information via a centrali7ed message
database.
Question "
<he eight)bit representation of the decimal number D$ is 999@@99@.
(a) hat is the twos complement representation of 0"/4<2>" D$3
(b) hat are the sign and magnitude representations of 0"/4<2>" D$3
(c) hat is the decimal e6uivalent of 99@@9@@@3
(d) <he 4(!22 representation of & is 9@99@999.
hat is the 4(!22 representation of D3
Solution
(a) <he one complement of 999@@99@ is
@@@99@@9
<he twos complement of 999@@99@ is
@@@99@@9
E @

@@@99@@@
(b) <he sign and magnitude representation of 0"/4<2>" D$3 is#

@999@@99@
(c) <he decimal e6uivalent of 99@@9@@@ is
9 9 @ @ 9 @ @ @
@D
8
?U %D @? 8 U D @
%D E @? E U E D E @ B $$
(d) DB &)U R D is \ consecutive spaces to the lift of &S
&B 9@99@999
D
BOD
DB OD)U B ?8
?8B 9@999@99
D
DB 9@999@99
D
Question #
<he list below contains hardware and software aspects of interface. <hese are hardware aspects#
+ist the hardware.
(a) !ommand line (b) <ouch (creen (c) 2cons (d) 5ull)down menus (e) (tart button (f)(tatus bar
Solution
<ouch (creen
Question $
(a) &ow can an Gexpert systemI be of value to a doctor3
(b) +ist <- obstacles to be overcome before natural)language programming could become part
of everyday life.
(c) G .obots replace humansI. /ive <- advantages and <- disadvantages of using robots.
(d) (uggest <- ways in which a high school student could benefit from using a newsgroup.
Solution
(a) 4n G"xpert system G can be of value to a doctor by assisting the doctor in obtaining a
second opinion on a diagnosis or providing the doctor with additional ideas relating to the
symptoms.
(b) i. Developing of natural language to understand the many dialects of the "nglish
+anguage is needed.
ii. /etting the computer to GunderstandI the semantic meaning of a phrase or a sentence
and to lin* the concepts in a meaningful way.
(c) 4dvantages.@. .educed production time
D. .educed wastage of material due to human error caused by fatigue or
interruptions.
Disadvantages @. &uman labour is placed causing unemployment.
D. +ess investment in human labour leading to increased poverty among
uns*illed wor*ers.
(d) i. <o get information needed for research
ii. broader perspective on a sub=ect can be gained.
iii. (haring of *nowledge with others.
Question 9
"xplain what is
(a) 2nternet .elay !hat
(b) 4 synthesi7er
(c) >ideotext
(d) 4 web browser
(e) 4rchiving
Solution
(+) Inte(net Rel+, C&+t (2.!) is a multi)!hannel !hat system that is run on a computer
networ*. 2t gives people all over the world the ability to tal* (type) to each one othe in
real time each user has a nic*name and converses with other users either in private or
on a channel (chat room)
(6) S,nt&esiFe( is an electronic musical instrument designed to produce artificially
generated sound, using techni6ues such as additive, subtractive, ,1, 5hysical
modeling synthesis, or phrase distortion.
(') Ai*eoteBt communication service that is lin*ed to an adopted television receiver or a
personal computer by telephone lines, cable television facilities, or the li*e. 2t allows
a user to retrieve and display alphanumeric and pictorial information at home.
(*) @e6 6(o.se( software programs that help one navigate the web and access. <ext,
graphics, hyperlin*s, audio, video, and other multimedia. Crowser wor* by
GtranslatingI or GinterpretingI hypertext mar*up language (&<1+) the code
embedded in web pages that tells them how to loo*. Crowsers read this code and
display the web page accordingly
(e) A('&i?in/ is a system that allows all email messages passing through a server to be
securely archived or stored, either on the same machine or to a secure off site
location. 4rchiving provides the ability to store all message passing through a /1(
server to a specific archive (or store). <his archive can either be local to the mail
server, or more normally at a secure off site location
Question 1%
(a) hat is the difference between a web page and a website3
(b) +ist <&."" responsibilities of a systems analyst.
(c) i. Criefly explain the difference between data integrity and data security
ii. -utline -0" method of ensuring the integrity of the data.
Solution
(+)<he difference between a web page and a website is basically about 6uantity. 4 single web
document (an &<1+ file) is considered a web page. /roups of web pages constitute a website.
(6) i. designing information systems.
ii. performing feasibility studies
iii. performing system reviews.
(') i. data integrity is the property that data meets a prior expectation of 6uality and accuracy
from capture the use. Data security, however, is the protection of data from unauthori7ed
( accidental or intentional) modification, destruction, or disclosure. ii. -ne method of ensuring
the integrity of the data is to employ parity chec*ing in the encoding and transmission of data.
E?en >+(it,) 2f a frame contains an odd number of ones, a @ (the parity bit) is added to ma*e the
number of ones an even number. hen the frame is received, if the number of
ones is not even, an error is reported and the frame declared corrupt.
O** >+(it,) similar to even parity in that if a frame contains an even number of ones the parity
bit ma*es it odd with the same results at the receiving end.
Question 11
rite an algorithm using pseudocode to do the following se6uence at ts*s#
(a) .ead in the values of two numbers
(b) ,ind the product of the two numbers
(c) ,ind the sum of the two numbers
(d) !hec* whether the product is bigger than the sum.
2f the product is bigger, it must print a message to say so, and if the product is not bigger it must
print a message saying that the product is not bigger.
Solution
(a) ."4D 0umb@
."4D 0umbD
(b) 5rod B 0umb @K 0umbD
(c) (um B 0umb E 0umbD
(d) 2f 5rodF(um then begin
5rint G<he 5roduct is CiggerI
"ndif
2f (um B 5rod the begin
5rint G 5roduct is not biggerI
"ndif
2f (um B 5rod the begin
5rint G 5roduct and sum is e6ualI
"ndif.
Question 12
rite an algorithm to find the sum of 1 numbers where the user supplies the value of 1 and
types in the numbers, in response to the prompts generated by the program.
Solution
(um B 9
.ead B 1
,or counter B @ to 1 do
5rint G"nter 0umberI
.ead 0umb
(um B (um E 0umb
"ndfor
Question 13
!onsider the following routine#
205U< Q, M
L B Q K Q E M K M
5.20< G <he sum of s6uare isP GL
,or "4!& of the first two lines of code, write a comment to indicate what the code does.
Solution
+ine @) .ead or accepts value that are stored in the variables Q and M
+ine D) (6uare the value in Q and s6uare the value in M and odd the two s6uares and store the
result in L
+ine %) -utput the phrase G the sum of s6uare is G, followed by the value in L
Question 1
(a) &ow is ob=ect code obtained from source code3
(b) Criefly explain the difference between source code and ob=ect code.
Solution
(a) <he -b=ect !ode is obtained from the source code by compilation or interpretation of
the
source code.
(b) <he (ource !ode is the program written (coded) in an high level language by the
computer
programs.
<he ob=ect code is the machine language version of the source coded that is created by the
compiler or the interpreter.

!ompiler

2nterpreter


Question 1!
!onsider the following code
205U< 4,C
D-
4 B 4 E C
C B C ' @
+--5 &2+" CF9
5.20< 4,C.
Using a trace table, or other wise, determine the values printed in the final statement, when the
input value of 4 and C are (a) @, D (b) %, U
Solution
(a)
4 C 5.20<"D
@ D U,9
% @
U 9
U, 9 is printed.
(b)
4 C 5.20<"D
% U @% , 9
O %
@9 D
@D @
@% 9
@%, 9 is printed
Question 1"
rite a program in basic, 54(!4+ or another specified language (0-< pseudocode) to do the
following#
i. 4nnounce (with a printed statement) that it will find the volumes of sets of
boxes.
ii. 4s* how many boxes there are
iii. ,or each box, as* for the length, width, and height.
(-U.!" !-D" -CN"!< !-D"
iv. !ompute the volume of "4!& box. 2f the values of length, width and height
are all greater than 7ero, then print the volume.
v. hen finished with all the boxes, print the message# Golumes have been
foundI.
Solution
5rogram volume (2nput, -utput)P
>ar
>ol, length, idth, &eight# .ealP
0YofYCoxes, counter# 2ntegerP
Cegin
rite2n (G<his program will calculate the volume of a set of boxesI).
rite2n (G"nter the number of boxes in the setI)P
.ead (0YofYCoxes)P
,or counter# B @ to 0YofYCoxes do begin
rite (G"nter the length of the box#)P.ead2n (width)P
rite (G"nter the height of the box#)P.ead2n (&eight)P
>ol# B +ength K idth K &eightP
2f >olF9 then
rite2n (G>olume of boxes#, G>ol# $#D)P
"ndP
rite2nP
rite2nP
rite2n (G>olumes have been foundI)P
"nd.

You might also like