2022 ICT Essay (Part B) - English
2022 ICT Essay (Part B) - English
@or:,ii Ei(l))(l) otoli'.>rllo!'!~~EJ @ot:ilJ E)(l))(l) acoJil; I~ . , - I J(l) o~o)i)oioM~EJ ® _©0 !:ill . El1SJ)(l)_ o:;olilrno@~~•
@6Ui!,Je,ia;u Lif L6"lff~ /!')6"llilOl/b8,6TlUJ
Department of Examinalions, Sri Lanka Department of
©?!:ill EliSJJ(l) O(oibOJo®~~EI
Gj&U,,;,.,-,a;u LI .,!!?~
u1I
l!ilel
[~IOOIOOJJ
@t:l)06%:lJ6i i:lJO C525)£3@E)~25) t:i)Ot:D®-Eliic.:J
$5ffi6ll6i:i, Gs5rrL~urrL6i:i G~rrw1®JLU~UJ6i:i II
Information & Communication Technology II
Part B
0i, Answer any four questions only.
e
5. (a) Consider the logic circuit shown in the following figure in which P, Q and R are the inputs
ak
and Z is the output.
p Q R
ay
s an
z
is
D
an
uw
(i) Draw the complete truth table for the above circuit.
(ii) Complete the Karnaugh map relevant to the above circuit according to the following format.
PQ
N
9~ 0\ 11
'
10
T
0
R
IC
(iii) Using the Karnaugh map, derive the most simplified sum-of-products expression for the
output Z. Show the loops clearly on the Karnaugh map.
(b) (i) Using Boolean algebra, show that the Boolean expression ABC+ Alic+ ABC + ABC is
equivalent to BC+ AC+ AB.
(ii) Draw a logic circuit for the above simplified expression in (b){i) by only using OR and
AND gates.
(iii) Draw a logic circuit for the above simplified expression m (b)(i) by only using NAND
gates.
6 · (a) Write down the most suitable terms to replace the blanks labelled ® to @ in the following
paragraph related to data encryption.
There are two types of encryption techniques used namely, symmetric key encryption and asymmetric
key encryption. In ..... .. .... .~-.. .... ..... key encryption, the same key is used for encrypting
and decrypting the information. In this scheme , to exchange information, users must share a
@ @ . d'ffi
• • • • • • • . . . . . . . . . . .. -1- . . .... key among themselves . In .. . ... ...... ....... ...... .. key encryption , 1 erent
keys are used for encrypting and decrypting the information . In this technique, users usually have
. of d'1ss1n11
a pa1r @
. ·1ar keys known as a .. \.. ...................... key and a .... .........(!)
.. .. ...... .. ..
key. When one key is used for encryption , the other key can decrypt the .. .......... ®...... ••.. ··
back to the origin.al plain text.
(b) Suppose that the ABC Company has received the 192.248 .154.0/25 IP address block to be
e
distributed among its four departments.
ak
It is required to subnet the above IP address block to satisfy the following requirements. Assume
that each department is located in a separate building.
ay
Subnet Number Department Name Number of Computers
S00l Accounts 30
S002 Sales
an
28
S003 Service 18
s
S004 Administration 24
is
(i) Write the first address and the last address in the given address block.
D
(ii) Write the subnet mask of the given address block in dotted decimal notation.
(iii) How many host bits are needed to create the required number of subnets?
an
S003
S004
T
IC
(c) (i) Write one difference between User Datagram Protocol (UDP) and Transmission Control
Protocol (TCP) transport layer protocols.
(d) (i) What is the functionality of a Domain Name System (DNS) server?
(ii) What is the functionality of a Dynamic Host Configuration Protocol (DHCP) server?
7
· (a) :4-n loT setup to water a plant in a greenhouse is shown in Figure 1. A mobile application
IS used to operate the water-releasing tap. As shown, the setup includes a sensor, a controller,
and a rnicrocontroller (Arduino Board) with a communication module.
B .
Figure 1
(b) The moisture sensor provides 10 levels of moisture While (true){
e
intensity with 1 being "the driest" and 10 being "the Read Moisture Level as M_L
If [X]
wettest"; 8 is the desired level to be maintained. The
ak
If Tap Closed
algorithm on the right can be used to automate the task Then [Y]
of opening the tap when the · soil is dry and to stop End i f
Else
ay
the water flow when enough watering is done. Write If Not Tap Closed
down the most suitable entries for the places labelled Then (Z]
End i f
X, Y and Z. [Note - While (true) block represents the End i f
continuous loop function in Arduino]
an }
are captured using a mobile phone are stored in the plant database. The multi-agent system
works as follows:
D
,, •
an
User
• Interaction • Agent 2 processes the images, identifies
anomalies if any, and triggers Search Agent
if needed.
uw
Plant
• Search Agent searches relevant information
from the Internet, feeds the search results
to Agent 2 who updates the database after
N
(ii) The interaction P involves saving plant details in the database and retrieving those for
Agent 1. The interaction R involves reading the database and writing search results to the
database. Explain the interactions Q and S.
(iii) After long-term use of the system, it was decided to remove Search Agent assuming that
the database contains all the information needed. Write down the main disadvantage of
this removal.
(e) The owner has started an online shop to sell the harvest from this greenhouse to buyers who
are nearby.
(i) State one advantage of limiting sales to the community nearby the greenhouse.
(ii) State an alternative payment method that can be used until an online payment facility is setup.
(iii) He cultivated tomatoes and sells salted dried tomatoes online (as a snack). This, known
as value addition, gives higher profits. Give another advantage of this value-addition to
his e-business.
[see page twelve
AU2022(2023)/20/E-II - 12 -
8. (a) (i) What is the output of the following python script if 1002 is given as the input?
(ii) What would be the modification required to the B = B + c code line of the above code
if the reverse of a given positive number is to be printed?
(Example: if the input is 1234, the output should be 4321)
(b) Assume that your class is having a party, and each student is asked to bring one food item.
e
The class teacher has decided to make the party interesting by introducing one rule: the first
ak
and last letters of the name of the food item must match with the first and last letters of the
student name.
For example, percy is allowed to bring potato curry and prageeth is allowed to bring pepper
ay
fish.
Write a Python function called Party() that takes the student name and the name of the food
an
item as parameters. The function should return True or False to indicate whether the student
is allowed to bring the food item to the party or not.
Example:
s
Party ("percy", "potato curry") should return True
is
Note: You can assume that student name and food item name are always lowercase strings and
have at least two letters. There may be hyphens and spaces in the names, but these will
an
not appear at the beginning or end of the string. The names will not contain numerals.
(c) Write down the most suitable statements for labels @ to ® in the flowchart given below which
uw
factorial of 0 is defined as 1.
IC
®
®
9. (a) Draw the Entity Relationship (ER) diagram for the following scenario.
A student uses the following data to register for subjects. Each subject is represented by
itc; subject number (subjectNumber), subject name (subjectName) and prerequisite subject. A
student can register for more than one subject during a semester. Each student has a first name
(studentFname), a last name (studentLname) and a unique student number (studentld). Student
age (age) is required to register for subjects. Subjects are offered based on the availability of
the resources. Hence some subjects will not be offered during a semester. A subject offered in a
semester (subject_offering) includes subjectNumber, year, semester, teacher identifier (teacherid) ,
and classroom. One subject_offering is assigned to a single teacher who is represented by a
teacherid, name of the teacher (teacherName) , and qualifications. Teacher can have several
qualifications. Marks are awarded to students for each subject that they register.
Use only the terms from the list given below for the entities and attributes in your ER
diagram. You have the , freedom to choose relationship names.
e
List: {age, classroom, DOB, marks, qualification, semester, student, studentFname, studentld,
ak
studentLname, subject, subject_offering, subjectName, subjectNumber, teacher, teacherld,
teacherName, year}
Note: DOB - Date of Birth
ay
(b) Use the following Employee, and Assign_Project denormalized tables to answer parts (i), (ii),
an
(iii), (iv) and (v). Please note that primary key(s) of each table is(are) underlined.
Employee
s
Em12l0ledd FullName DOB Salary
is
Assign Project
Projectld Emplo:>:eeld PName Description
N
P07
P09 E0Ol Inventory Implement inventory management system
P09 E007 Inventory Implement inventory management system
-
:
-- --
'
-
w
will be performed by the operating system Q Q Q Q
during the time period indicated by '0 '? 0
(b) Assume that the time period the operating system allocates to each process to run on the
e
processor in a single instance is Q.
ak
Explain why W (the time period the web browser process runs at the second instance) is less
than Q as shown in the graph.
ay
(c) Assume that we have a computer that can use 16-bit virtual addresses from O up to 64 K.
Assume further that this computer has only 32 KB of physical memory and that the page size
an
in this computer is· 4 KB.
The above 16-bit virtual address is made up of the bits of the page number followed by offset
bits.
s
User runs a particular program having a size of 32 KB on this computer. A few selected fields
is
of the page table of that process at a particular time are shown in the figure below.
D
0 011
101 1 • The virtual addresses on page 0 are from 0 to
409 5 and on page 1 are from 4096 to 8 I 91 and
2 000 0 so on .
uw
3 000 0
4 000 0 • entry.
The Present/absent bit indicates the validity of the
this bit is 1, the entry is valid and can
If
5 000 0
be used. If it is 0, then the relevant virtual page
N
6 000 0
is not in physical memory.
7 000 0
T
Assume that in the above process the virtual address 000~ 0000 0000 OOll is wanted. Is that
page available in physical memory? If your answer is 'yes' , then write down the 15-bit physical
IC
address that the above virtual address will be mapped into. If your answer is 'no', then write
down the actions that the operating system will take on behalf of that process for the said
requirement.
(d) Give two reasons as to why a page of a process may not be in physical memory.
(e) Explain how the operating system could find the blocks of a file when the files are stored on
a hard disk using
(i) contiguous allocation and
(ii) index allocation.
(Hint: the use of the directory entry)