INFORMATION INFORMATION TECHNOLOGY THEORY (1993) Question 1
(a) Using appropriate appropriate examples, explain the difference difference between discrete discrete and continuous continuous data. (b) Define Define the terms ‘hard ‘hard copy’ and ‘soft copy’. copy’. Solution
(a) Discrete data represent data that permit only certain certain values (there are gaps between the the possible values) Discrete data is countable. ith 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 relatively permanent form 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 functio functions ns of an operat operating ing system system.. (b) (i) /ive -0" -0" benefit benefit to the the user of customwr customwritte itten n software. software. (ii) /ive -0" benefit to the user of generalpurpose software. (c) hat do the abbreviations ‘-1’ ‘-1’ and ‘12!’ stands for3 Describe a situation in which "4!& is used. Solution
(i) (iv) (iv)
(a) 4n operating operating system system does any of the followi following# ng# !ontro !ontrols ls progra program m executi execution on (ii) (ii) !ontrol !ontrolss input input and output output (iii) (iii) 1anages 1anages data data and and file file storag storagee 4ssign 4ss ignss dif differ ferent ent tas*s tas*s to the !5U (v) 5rovid 5rovides es secu securit rity y and and cont control rol
(b) (i) !ustomwritten software meets the specific specific need(s) of the the user (ii) /eneralpurpose 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 ferriteimpregnated 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
ater &eater
!omputer &eat to digital ignal to turn heater up;down ;off converter
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 =ob s or made the =obs obsolete.
(b) 0ame -U =obs which have been created created by the computer industry. industry. olution (a) (i) (i) !ar !ar 1anuf 1anufact acturi uring ng 2ndus 2ndustry try !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)
5rogra 5rogramm mmers ers (ii) (ii) oft oftwar waree "ngin "ngineer eerss (iii (iii)) !ompu !omputer ter -perat -perators ors (iv) (iv) Data Data "ntry "ntry -per -perato ators rs
Question !
(a) Define "4!& of the following terms terms as it applies to data transmission# (i) >oice band (ii) implex (iii) &alf duplex (b) (i) what is is meant by ‘data integrity’3 integrity’3 (ii) tate <- examples where a lac* of data integrity integrity can causes loss, inconvenience or embarrassment. Solution
(a) (i) >o >oice band has a bandwidth bandwidth of %,999 %,999 and can transmit transmit data at speeds speeds in the range 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 integrit integrity y refers refers to techni6ues techni6ues which which protect protect a database database against against invalid invalid alterati alteration on or destruction. (ii) a.
4ltering a personAs personAs age, instead of an age value of @: an age value of %: is entered.
Solution
ater &eater
!omputer &eat to digital ignal to turn heater up;down ;off converter
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 =ob s or made the =obs obsolete.
(b) 0ame -U =obs which have been created created by the computer industry. industry. olution (a) (i) (i) !ar !ar 1anuf 1anufact acturi uring ng 2ndus 2ndustry try !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)
5rogra 5rogramm mmers ers (ii) (ii) oft oftwar waree "ngin "ngineer eerss (iii (iii)) !ompu !omputer ter -perat -perators ors (iv) (iv) Data Data "ntry "ntry -per -perato ators rs
Question !
(a) Define "4!& of the following terms terms as it applies to data transmission# (i) >oice band (ii) implex (iii) &alf duplex (b) (i) what is is meant by ‘data integrity’3 integrity’3 (ii) tate <- examples where a lac* of data integrity integrity can causes loss, inconvenience or embarrassment. Solution
(a) (i) >o >oice band has a bandwidth bandwidth of %,999 %,999 and can transmit transmit data at speeds speeds in the range 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 integrit integrity y refers refers to techni6ues techni6ues which which protect protect a database database against against invalid invalid alterati alteration on or destruction. (ii) a.
4ltering a personAs personAs age, instead of an age value of @: an age value of %: is entered.
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) (c) 0am 0ame <<- dist distin inct ct effe effect ctss tha thatt vid video eote text xt syst system emss can can have have on the the tra tradi diti tion onal al 5ost 5ost -ffi -ffice ce Solution
(a) >ideotext >ideotext is an information service service in which data is transmitted transmitted over television television cables or telephone lines and displayed on a television or computer screen in the home. (b) >ideotext >ideotext systems systems are used used for# (i) 4dvertising a product (ii) (ii) endi ending ng war warni ning ng mes messa sage gess to use users rs abo about ut dan dange gero rous us wea weath ther er.. (c) >ideotext >ideotext systems# systems# (i) (i) edu educe ce the the num numbe berr of pers person onss usi using ng the the post postal al sys syste tem. m. (ii) (ii) edu educe ce the the pap paper er flo flood od caus caused ed by the the tradi traditi tiona onall post postal al sys syste tem. m. Question #
2n 4!22 !B code, the letters of the alphabet are stored using consecutive codes. co des. 2f ‘C’ is represented by @9999@9, what is the representation of ‘/’3 (a)
(b)
/ive the binary value of %@9 E @@9@
Solution
B
(a) / is five five ($) spaces to the right right of C
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.
H2+-1"<"I B B B B B BI
2nitials B $ hile initial JB @99 do
5rint initial 2nitial E $ "ndwhile
initial K@.?@
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 non7ero 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 'ontol nit *oes +n, o- t&e -ollo.in/0 reads and interprets program instruction directs the operation of the internal processor component controls the flow of programs and data in and out of primary memory controls the flow of information to and from l;- devices.
(ii) T&e Ait&eti'Lo/i' nit0 performs all arithmetic operations performs logical operations stores the data which can be immediately processed by the program instructions. (iii)
T&e M+in Meo, stores program instructions prior to execution stores the data which can be immediately processed by the program instruction 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;recordsecords 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 mainframe 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 'todate 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.
tate the proper te'&ni'+l tes for "4!& of the -U underlined phrases in the above passage. Solution (i)
+ocal 4rea 0etwor*
(ii) (iii) (iv)
5rotocol Culletin Coard of "lectronic 1ail 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 +
(i) A s,ste An+l,st *oes +n, o- t&e -ollo.in/0 5erforms feasibility studies derives information system, re6uirements;specifications designs information systems performs system reviews (ii) A Co4ute O4e+to *oes +n, o- t&e -ollo.in/0 prepares e6uipment to run =obs mounts and removes tapes, dis*s and dis*ettes monitor operations during the running of each =ob (iii) A 5+t+6+se A*inist+to *oes +n, o- t&e -ollo.in/0 designs a database creates a database maintains a database coordinates discussion between user groups
b. A te+'&e '+n use t&e 'o4ute to *o +n, o- t&e -ollo.in/0 develop course wor* store students’ records use G!omputer 4ides 2nstructionI software teach students to use the computer mar* scripts c. T&e 'o4ute is 6ene-i'i+l to t&e 6+n7in/ in*ust,8 6e'+use it0 provides management with useful information for running the ban* *eeps records of transactions by customers provides electronic funds transfer 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 machinereadable form so that it could be edited on a !omputer MICR used by ban*s for reading information on che6ues (') To ensue *+t+ se'uit, one +,0 use fireproof cabinets for storing tapes and dis*s perform bac* up and recovery procedures properly implement a password system to prevent unauthori7ed access use anti virus software use software features to restrict access to certain records. Question #
(a) 2n a certain character coding system, each character occupies seven (O) bites 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 $@9 Q B @@@@@ Solution (a) H B 1$R&is consecutive spaces to the left of 1S M : @9@999@ B 8@RDecimal valueS B O? B @99@@99 RCinary >alueS H : 8@$ (b)
$@9 'Q B @@@@@B %@ RDecimal >alueS Q B $ %@ B @ B @9@9@ RCinary >alueS
Question $ (a)
(b)
hat is the purpose of formatting or initiali7ing a dis*ette3
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)
(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.’
Solution
(b) (i)
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 () 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)
!B4 4BC CB! -+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
Question 1% (a) rite an algorithm to read an integer value for !-" and print the appropriate grade based on the following#
!-" 89 or more
/4D" 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 ) then hB@ else f B@ gB@ for = B @ to n do hBfEg fBg gBh 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 printGI "ndif (')
T&e -ollo.in/ is 4inte* 6, t&e +l/oit& .&en n ; !0
,%,$,%,$
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
i. ii. iii. iv. v. (b)
(a) !omputer 4ided Design and Draughting provides# improved accuracy and legibility of engineering drawing ease of ma*ing alterations to designs leading to increased productivityP decreased time for developing blue printsP increased detailP simulation;cost estimation facilities
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 205U< D">2!"
!5U
C4!H20/ <-4/"
Question 3
-U<5U< D">2!"
(a) (b) (c) (d)
!onvert the decimal number $$ to its binary e6uipment. !onvert the binary number @9@@9@9 to its decimal e6uipment. 4dd the binary numbers @@9@9 and @99@@.
Solution
(a)
$$ O @% ? % @ 9
@ @ @ 9 @ @
$$@9 B @@9@@@ (b) @ ?
9 @ @ 9 $ %
@ 9 @ 9
@9@@9@9 B? E E %E @Rignoring columns with 9S B :9@9 (c) E @
@ @ 9@ @ 9 @ 9 9 @ @ 9 @ @ 9 @ (e) pB O 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 tes for "4!& of the -U underlined phrase in the passage above. Solution
(i) read;write head (ii) trac* Question !
(iii) sector
(iv) buffer
(a) 2dentify -U measures to secure data. (b) tate <- advantage and <- disadvantages of normal mail over electronic mail. Solution
(a) (i)
-ne can secure data by# 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 &ealth education (iv) monitoring patients
(iii)
(b) (i) 4 networ* 1anager does any of the following# tarts up and shuts down the networ* grants access privileges monitors use of the networ* and other shareable resurces liaise with other networ* re# connectivity (ii) 4 database administrator# grants access to data 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 tes for "4!& of the 2Q underlined passages. (b) tate <- functions of an operating system. Solution (a) (i) system software (ii) application software (iii) 1enus (v) customwritten software (vi) customi7ation
(b)
(iv) 2!-0
T.o -un'tions o- +n O4e+tin/ S,ste +e0 (i) input;output control (ii) file and dis* management
Question $
hat is printed by the following algorithm3 U1 B 9 0 B 9 &2+" 0J %9 DU1 B U1 E 0 520< 0, U1 0B 0 E % "0D&2+"
Solution
9, 9,%,%,?,?:,:,: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)
-U!" !-D"
(b)
!-152+"
-CN"!< !-D"
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++"
L"-!-U0< B 9 <"0!-U0< B 9 2nput 0U1C"
while 0U1C" not e6ual ::: do
if 0U1C" B 9 then L"-!-U0< E@ endif
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) (b) (c) (d) (e)
!ommandline interface and graphical user interface 2mpact printers and nonimpact printers !haracter printers and line printers /eneral purpose software pac*age and speciali7ed software pac*age implex and duplex transmission
Solution
(a) (i) 2nterfacing device for commandline 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 nonimpact 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@ to decimal number
(c ) "xplain the term ‘parity’ as it relates to the coding of characters. (d)
4dd the binary numbers @@9@9@ and @9@@@9
Solution (a)
$O 8 @ O % @ 9
@ 9 9 @ @ @
$O@9 B @@@99@
(b) @ O
@ ?
9 $
@
@ %
@
9 @
@ 9
@@9@@@9@ B O E ? E E % E E 9 B @@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 @ E @ 9 @ @ @ 9 @ @ 9 9 9 @ @
Question 3 0ame the hardware component that performs "4!& of the following functions#
(a) (b) V (d) (e) (f) (g)
tores programs and data that are currently being used by the !5U 5erforms the logical operations within the !5U tores programs and data that are not currently being used by the !5U 1odulates and demodulates signals eads from dis*s Directs internal operations within the !5U 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 (e) ead;rite &ead (f) !U (control Unit) (g) 2nput Device (Heyboard, 1ouse etc.) Question
(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 department’s 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)
(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.
(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.
(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) (ii)
tate <- new =ob positions that would be created in the ban*. 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
Question #
(a)
(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)
<
M 1
Y
=
2
$
!omplete the following trace table for the following algorithm, given that the number is the input value.
(b)
ead Q or 1 B @ to Q do MB Q'1 L B $KM1 "nd 5rint L hat is printed by the algorithm3
Solution (a)
Q
1 @
M %
L @
8
%
@
9
(b) 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 @W.
(b)
rite an algorithm to read in <- numbers into 4 and C.
Solution (a) 2nput 52!" 0"52!" B 52!" E (52!" K 9.@) 5rint 0"52!"
(b)
2nput 4 2nput C 2f 4 B C then print G0umbers are e6ualI endif 2f 4 F C !BC CB4
4B ! "ndif 5rint 4, C Question 9 rite an algorithm to read "+">"0 numbers, find their average and print it.
8 ? : ? $ ? @9 O 9 @?
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) (b) (c)
0ame a type of device which produces a human readable copy. 0ame a type of device which produces a machine readable copy. 0ame a type of device that accepts data in human readable form.
Solution
(a) 5rinter , 5lotter (b) Dis* Drive (c) Heyboard Question 2
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* Question 3 (a) (b) (c) (d)
(ii) 5oint of ale terminals (iii) -ptical 1ar* eaders (iv) canner
!onvert the decimal number 8% to its binary e6uivalent. !onvert the binary number @@99@@9@ to its decimal e6uivalent. 4dd the two binary numbers @@9@ and @99@9@. "xplain the difference between discrete and continuous data.
Solution
8%@9 B @9@99@@
(a)
(b) @ O
@ ?
9
E @ @ @ @
@ %
@
9 @
@ 9
B O E ? E % E E 9 B @8 E ? E 8 E E @ B 9$@9
@@99@@9@
(!)
(d)
9 $
@ 9 9
@ @ 9
9 9 @
@ @ 9
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.
(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)
(ii)
ERSONNEL (i) 5rogrammers (ii) Data "ntry !ler*s (iii) Database 4dministrator (iv) ystems 4nalysts
FNCTION rites programs that solves specific problems se 7e,ent, *e?i'es to ente +. *+t+ into +'&ine e+*+6le -o+t !reates and controls the use of an organi7ation’s database.
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)
(C)
(!)
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. i.
(D)
4dvantage#
Question " (4 T C) St+te T@O 4o6les .&i'& .oul* +ise -o t&e s&+in/ o- *+t+ in t&e 'o4+n,
(!) 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.
(C) i.
U5Y+-4D is the process of reading data from a user’s 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.
iii.
4 local area networ* is the lin*ing of computers or terminals in the same building or site so that they can communicate.
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 user’s 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 @ QB
hile !-U0< J $ DQBQE print !-U0<, Q !-U0< B !-U0< E $ endwhile
Solution
CONT @ ? @@ @? @ ?
<
? 8 @9 @
>RINTE5 @, ?, ? @@, 8 @?, @9 @,@
(!)
"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 LEEL >ROGRAMMING LANGAGE 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 LANGAGE 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 highlevel 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 reinterpreted. 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 recompiled for the changes to ta*e effect.
(!)
read 4 read C if 4BC <&"0 520< G0umbers are e6ualI endif if 4JC print 4 else print C endif
Question
@ % $ 9 ? O % $ 9
:::
::: is the dummy value which terminates the data. rite the pseudocode algorithm read in any data in the above format, and print (4)
Solution
read 0U1C 9!-U0< B 9 &2/&"< B 0U1C
while 0U1C JF ::: Dif 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, %CONT 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
455+2!4<2-0 5ointofsale /ames 4rchitectural design 1ultiplechoice examination 5ublishing !he6ue processing +anguage processing 5reparing letters
205U< D">2!" optical mar* reader *eyboard magnetic in* character recognition microphone pads and tablets barcode reader =oystic* scanner
Solution
455+2!4<2-0
205U< D">2!"
5ointofsale /ames 4rchitectural design 1ultiplechoice examination 5ublishing !he6ue processing +anguage processing 5reparing letters
barcode reader =oystic* pads and tablets optical mar* reader scanner magnetic in* character recognition microphone *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 inputdevices that can be read directly from source documents are# i. barcode readers ii. mar* and character readers iii. image scanners
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@ and @@@9@, giving your solution in binary form. (!) /ive the C!D representation of $:@9 (D) /ive the C!D representation of $:@9 Solution (4)
8O @ % @ @ @ @9 9 $ @ 9 @ @ 9
8O@9 B@9@9@@@ (C)
@
@ E 9
@ @ @
9 @ 9
@ @ 9
9 9 @
@ @ 9
(!)
$ 9@9@
: @99@
$:@9 B 9@9@ @99@ in C!D representation (D) !onvert ($:) using the two’s complement method# $:@9 $:@9
B 9@9@ @99@ in C!D 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.
(C)
or "4!& of the following, state <- ways in which information
i. +aw enforcement ii. 1edicine iii. "ntertainment Solution (4)
i. !Ds have a large storage capacity (at least $ gigabytes).
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.
i.
ii.
i.
L+. en-o'eent tore information about criminals.
ii. oftware that records and maintains patients record in databases
i.
Entet+inent 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 0U1C if 0U1C@ B 0U1 then 5rint Gnumbers are e6ualI endif if 0U1C@F0U1C then
5rint 0U1C@
else 5rint 0U1C
endif
(C) ead 4 ead C !B4 4B C CB! Question 9 (4) !opy and complete the trace table below for the following algorithm.
QB$ H B @9 U1 B $ hile umJO$ do U1 B U1 E H 5rint H HB H E Q "ndwhile 5rint U1
Q $ 9 $ (!)
H U1 @9 $$
hat is printed by the algorithm3
Solution (4)
Q $ $ $ $
H U1 @9 $ @$ $$ 9 O9 $ :9
520< @9 @$ 9
(C)
/4D20/ !4+" !-" 89 or more ?$ or more but less than 89 $9 or more but less than ?$ +ess than $9
/4D" 4 C !
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.
tate the component that performs "4!& of the functions named 4 to D and underlined above. Solution
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 4. 1odulates and demodulates signals C. 4ccepts voice inputs !. 4llow users to input architectural plans D. eads in graphics data ". Used for printing architectural plans . Used for entering text documents /. etrieves pricing data from grocery items &. Used to move the cursor
5EICE 5lotter Heyboard 1odem /raphics tablet 1icrophone Carcode reader Noystic* canner
Solution CHARACTERISTIC 4. 1odulates and demodulates signals C. 4ccepts voice inputs !. 4llow users to input architectural plans D. eads in graphics data ". Used for printing architectural plans . Used for entering text documents /. etrieves pricing data from grocery items &. Used to move the cursor
5EICE 1odem 1icrophone canner /raphics tablet 5lotter Heyboard Carcode reader 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.
Solution (4)
(C) (i) Catch processing (ii) eal time processing (iii)
(C) uggest <- reasons why computers may 0-< be used in classroom. (!) tate <- advantages of using computers in the classroom. Solution (4)
i. to teach students to use the computer ii. to mar* scripts iii. to use ‘!omputer 4ided 2nstruction’ software iv. to store student’s 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@@ to a decimal (c) 4dd the two binary numbers @@9@ and @9@9@, giving your solution as a binary number. (d) Determine the C!D representation of 8O@9
Solution
(4)
:9 $ @@ $ @ 9
9 @ 9 @ @ 9 @
:9@9 B @9@@9@9
(C) @
@
9
@
@
%
@
9
@@9@@ B E % E @ E 9 B @? E 8 E E @ B O@9 (!) @ @ 9 9 9
E @
@ @ 9
9 9 @
@ @ 9
(D) O 8
B 9@@@ 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.
(c)
or "4!& of the following devices, state -0" application in which the use of the device is
essential. (i) (ii) (iii) (iv)
canner 5lotter 1odem 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.
5e?i'e canner
A44li'+tion Des*top 5ublishing
5lotter 1odem 1agnetic 2n*character reader
5rints maps and architectural drawings 2nternet use and electronic mail 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 GI, GCI is replaced by G/I and so on. 0ote that the letter G4I is considered to follow the letter GLI. (i) (ii) (C)
hat would the word G"4MI be stored as 3 hat is the meaning of the following text3 0+
(i) hat is the purpose of a password3 (ii) hat is meant by the term ‘archiving’3 (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 NQQD ii. 0+
(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.
Question $ 5rograms are written with the general purpose of solving problems. &owever, it is unli*ely that a program will run completely errorfree on the first attempt.
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.
D2""0!" B 9 2nput 4, C 2f 4JBC then D2""0!" B 4C else D2""0!" B C4 endif print D2""0!" what is printed by the algorithm above if the input values are the following3
(i) 9 %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.
(b)
(i) @9 (ii) 9 (iii) 9
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. 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" <&-U40DI "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) Siil+it,0 -1 and 41 are both memory chips 5i--een'e0 41 is volatile and -1 is not
(b) Siil+it,0 2nformation on the -1 and "5-1 chips is only for the computer to use 5i--een'e0 2nformation on the -1 chip is permanently stored, information on "5-1 can be erased and new instructions written to it. (c) Siil+it,0 Data stored on loppy Dis* and &ard Dis* can be accessed without reading any other data item first(D4D). 5i--een'e0 loppy Dis*s are removable, &ard Dis*s cannot be easily moved from place to place. (d) Siil+it,0
Solution (a) (i)
(ii)
Cefore writing a program in high level language, it is advisable to write an algorithm that solves the problem.
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' eos are errors that occur when the programmer fails to properly thin* through the solution to a program. 4 *,un is the execution of a program for purposes of chec*ing that the program behaves correctly rather than for producing useful results.
Question
(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 other’s 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-een'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#
(c) our hardware re6uirements for teleconferencing are#
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@ and @@9@@ , 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)
:: : @ ? % @ 9 ::@9 B @@999@@
@ @ 9 9 9 @ @
(b) @
@ @
9 @
@ 9
9 @
@ @
9
@
9
9
9
9
E @
Con?etin/ 1%1%%%% to *e'i+l -o
@ ? B ? E B ? E @? B 89@9
9 $
@
9 %
9
9 @
9 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. . 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@
(a) rite an algorithm which reads three values, a,b and c and prints the largest of all three (b)
copy and complete the trace table which follows#
A SM % $ @ (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 % 8 @ $$
C $ @% % 8:
U1 @ @ 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 !-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 , 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. ariable (c) hat are the responsibilities of the !hief 5rogrammer3 Solution (a)
(b)
(c)
Lo/i' eo 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. +i+6le ' 4 named storage location in memory where data is stored temporarily during program execution and whose content constantly changes.
rite down what "4!& of the following abbreviations stand for, and what is the purpose of "4!& of the components listed3 (a) (b) (c) (d)
5-1 !5U 4+U 41
Solution (a) >ROM 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 Unitthis 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 all arithmetic operations all logical operations stores the data which can be immediately processed by the program 2nstructions. (d) RAM andom 4ccess 1emory# stores program instructions prior to execution stores the data which can be immediately processed by the program instructions. 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 serialaccess type3 (i) 1icrofilm (ii) 1icrofiche (iii) eeltoreel tape (iv) !artridge tape
Solution (a)
(b) (c)
(i) >LOA5
Question
(a) (b) (c) (d) (e)
-utline the <&"" main functions of a computer’s operating system &ow does a ‘pulldown menu’ help you in completing your tas* more easily3 /ive the 1-< important advantage of primary storage over secondary storage. /ive the 1-< important advantage of dis* storage over tape storage. 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 computer’s 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)
(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)
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 rein*ed or replaced.
(c)
4 light pen detects the presence and absence of light on a surface.
-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
(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)
@
9 @ @
(c)
O % @ 9
@ @ @
99999@@@ Question # (a)
(b) 2n dealing with computer security, explain -0" advantage of software restrictions compared with
physical restrictions. (c)hat is ‘telecommuting’3 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.
(a) (b) (c) (d)
Cac*ing up ead;rite head 4ddress 4ccess time
Solution elation to memory and storage# (a) +'7in/ u4
(b)
Re+*@ite &e+* 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 tie 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 MBQEM QBQ'M MBQEM 2 Q F M <&"0 L B QML "+" LB QEMEL "0D2 520< Q,M,L hat is printed by the algorithm if the input is# (a) @,@,@3 (b) @,,%3 Solution (a)
Q @ @
M @ @
L @ @
t&e -ollo.in/ is 4inte*0 18181
(b) Q @
M % @
L %
T&e -ollo.in/ is 4inte*0 28182 Question 1% 4 certain account at a ban* earns compound interest on a yearly basis, and has no deposits or withdrawals.
(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
(a) (b) (c) (d)
0ame the <- main component of the central 5rocessing Unit. or the two component named in part (a),discuss their 1420 functions. /ive -0" difference between 5-1 and "5-1 hat is ‘halfduplex transmission’
Solution
(a)
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 Ait&eti'Lo/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) &alfduplex 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
(a)
(a) 4n old %9 pin memory module (211) was capable of providing one byte at a time to the !5U. 4 % 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 % Cits is therefore e6ual to %;8 B Cytes. our of the old %9pin 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 an d floating point value do not vary in distinct steps but change smoothly and continuously over a range.
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.
(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 @9K O?8I is expected to give a clearer picture than one specified as G ?9K89I
(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.
(b)
(c)
Disadvantages# fingers fingers are are bigger than cursors cursors and therefore therefore each option re6uires re6uires more screen space. may become tiring if a lot of options have to be selected.
(e) !ustom software is software software specially created to to serve the needs of a specific 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 bit binary represen representati tation, on, give the binary representation for the decimal number @9 one’s complement complement representation for the decimal number nu mber negative @9 two’s complement 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 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)
@9 $ @ 9
9 @ 9 @
@9@9 B 9999@9@9 (ii)
(iii) (iii)
(iv) (iv)
ign ign and magnit magnitude ude repr represe esenta ntatio tion n for the decima decimall numbe numberr negati negative ve @9 is# @@@@@9@9@
(b) 2 >alid >alid 2i >alid >alid 2ii 2nvalid 2v >alid >alid
Question #
(a) 1r. N’s basic computer system has a monitor, *eyboard, system unit, mouse and modem. /ive two additional devices that would enhance each of the following# i. /am /ame 5lay 5layin ing g ii. ii.
(b)"xplain the difference in operation between a line printer and a character printer.
Solution
(a) (a) i. /am /ame 5lay 5layin ing g Noyst oystic ic*, *, /am /ame pads pads ii.
(b)
Question $
(a) /ive two reasons reasons why someone someone might might =oin the newsgroup newsgroup (b) "xplain the ma=or difference difference between internet internet relay chat and electronic electronic mail (c) /ive the meaning meaning of the following following abbreviatio abbreviations, ns, and for each case, explain explain the purpose# 2 &<1+ 22 <5 222 !4DD Solution
(a) @.
i. &<1 &<1+ + &yp &yper er
iii, !4DD !omputer 4ssisted Design and Drafting facilities the use o f computer to produce drawings(D 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.
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 individual’s personal information is use for other purpose than that which it was intended without the person’s permission. (b) @. use of a fire proof cabinet . use of a UC lash Drive; !D Curner;
(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 .
Question 11
rite an algorithm or program to read in two numbers and find the average of the numbers. Solution
ead 0umb @ ead 0umb 4verageB ( 0umb@ E 0umb ); 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 \9. emales fifteen years old or younger must pay \9, 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.
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 GemalesI then 5rint name 5rint G\9.99I "nd 2f 2f ageJB @$ and age FB and sex B G 1alesI then 5rint name 5rint G\%9.99I "nd 2 2f age JB @$ and age FB and sex BIemalesI then 5rint name 5rintI \9.99I "nd 2f 2 age J 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 %
Solution (a)
Q @ %
M ? @
L %
5rinted %,@,
(c)
(a) +ist <- advantages of secondary storage for long term storage of data, as compare to using the computer’s main memory. (b). i. 2dentify <- input devices that are regularly used at pointofale
(a) i. econdary storage is nonvolatile 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. +'o*e Re+*e
Ce*it*e6it '+* e+*e
(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.Don’t 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.
(a) 2n order to execute a (A) which is stored on the computer, the computer must read the instructions from its () 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)
(a) 2n order to execute a (A)>o/+ which is stored on the computer, the computer must read the instructions from its ()6+'7in/ stoe into its (C)Inten+l Meo, .
(b)
(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)
(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 bytes (@?bits), bytes (%bits) or 8 bytes (bits). (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 u--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)
(a) "xplain briefly what is meant by Gthe resolution of visual display unitI.
(b) hat is i. 5ointtopoint transmission ii. 4 voice response unit iii. 4 bulletin Coard.
Solution
(a) ointto>oint t+nsission is communication between two designed stations only. ii. A oi'e es4onse unit a type of voice synthesis that forms sentences by lin*ing pre recorded words from a database. iii.A ulletin o+* is a central online community similar to a wall mounted bulletin board that, allow uses in computer networ* to exchange information via a centrali7ed message database. Question " " $3
(b) hat are the sign and magnitude representations of 0"/4<2>" $3 (c) hat is the decimal e6uivalent of 99@@9@@@3 (d)
@@@99@@@ (b) " $3 is# @999@@99@ (c)
@ %
@ @?
9 8
% E @? E E E @ B $$
@
@
@ @
(d) DB & R D is \ consecutive spaces to the lift of &S &B 9@99@999 BO DB O B ?8 ?8B 9@999@99 DB 9@999@99 Question #
(b) +ist <- obstacles to be overcome before naturallanguage 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 . educed wastage of material due to human error caused by fatigue or interruptions. Disadvantages @. &uman labour is placed causing unemployment. . +ess investment in human labour leading to increased poverty among uns*illed wor*ers. (d) i.
"xplain what is (a) 2nternet elay !hat (b) 4 synthesi7er (c) >ideotext (d) 4 web browser (e) 4rchiving Solution (+) Intenet 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&esie is an electronic musical instrument designed to produce artificially generated sound, using techni6ues such as additive, subtractive, 1, 5hysical modeling synthesis, or phrase distortion. (') i*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 6o.se software programs that help one navigate the web and access. +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 0umb
(b) 5rod B 0umb @K 0umb (c) um B 0umb E 0umb (d) 2f 5rodFum then begin 5rint G
Solution +ine @ ead or accepts value that are stored in the variables Q and M +ine 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)
(b)
-CN"!< !-D" 2nterpreter
Question 1! !onsider the following code 205U< 4,C D4B4E C CBC'@ +--5 &2+" CF9 520< 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) @, (b) %, Solution (a) 4 @ %
, 9 is printed.
C @ 9
520<"D ,9