You are on page 1of 7

Faculty of Computer Studies

TM112

Introduction to Computing and Information


Technology 2

Final Examination

Summer Semester
2018-2019

Solution

Date: TBA

Number of Exam Pages: (7) Time Allowed: 3 Hours


(including this cover sheet)

Instructions:
1. Write the answers on the separate answer booklet
2. Total marks: 100 marks
3. The exam consists of three parts:
A. True/False Questions (20 marks): You should answer all questions.
B. Short-Answer Questions (30 marks): You should answer all questions.
C. Programming/Problem Solving Questions (50 marks): You should answer all questions.
4. The use of calculators is allowed
TM112 Final Exam Summer 2018-2019
PART 1: True/False Questions [20 Marks]
This part consists of 10 questions carrying a WEIGHT OF 2 marks each. You must answer ALL of the
following true or false questions. You should dedicate approximately 15 minutes for this part.

1. Cloud computing describes a system where users access a real machine. (F)

2. FPU is a common part of most modern processors, and it operates on floating-point numbers. (T)

3. Interpreters translate all the source code in one go. (F)

4. In Python, Lists are written as comma-separated items within squared brackets. (T)

5. Identification is the process of claiming you are a particular individual. (T)

6. The maximum size of the hash algorithm SHA-3 is up to 256 bits (F).

7. In Python, the positions of lists items start from 0, not 1. (T)

8. In computer-speak, an unsigned integer is an integer that is greater than or less than zero. (F)

9. In the truth table of the OR operation, the output is 0 if any of the entries is 0. (F)

10. Encryption is the process of proving your identification. (F)

PART 2: Short Answer Questions [30 Marks]


This part consists of 5 questions. You should attempt all questions.

You should dedicate approximately 50 minutes for this part.

Question 1: [6 marks]

What do the following acronyms stand for:

a- MAC address.
b- ASCII.
c- FPU.
Answer: (2 marks for each).

a- MAC address: media access control address


b- ASCII: American Standard Code for Information Interchange
c- FPU: Floating-point unit

Question 2: [6 marks]

a- Define Malware
b- List the three types that malware is usually categorized into.

2/7
TM112 Final Exam Summer 2018-2019

Answer: (6 marks: 3 marks each)


a- Malware is a collective term for any type of software that attempts to harm computers, or
the data held on them.

b- It is usually categorized into three types:


i. viruses
ii. worms
iii. Trojans.

Question 3: [6 marks]
Define briefly the following:
a- Brute-force attack.
b- Worm.
c- Salting.

Answer: (6 marks: 2 marks each)

a- Brute-force attack: systematic attempts to log on/ break a cipher using all possible
passwords
b- A worm is a self-replicating program designed to make copies of itself. Unlike a virus, a
worm is a standalone application.
c- Salting is a process in which a computer adds a small amount of additional data to a
password before it is hashed.

Question 4: [6 marks]

a) List three advantages of using short-range communication.


b) Name three technologies for short-range communication

Answer: (6 marks: 3 + 3)

a) Advantages of using short-range communication:


a. signals are usually stronger and hence can achieve a higher data rate
b. it is usually cheaper (if not free)
c. it uses less power to transmit and receive data.
b) Several technologies for short-range communication are available, but the most common
ones used by mobile phones are Wi-Fi Direct, Bluetooth and near-field communication
(NFC).

Question 5: [6 marks]

In cloud computing architecture, there are three layers. List them in order from down to top (you can

draw a diagram that shows how they fit) and talk briefly about each one.

Answer: (1.5 marks for the order, 1.5 marks for each layer)

3/7
TM112 Final Exam Summer 2018-2019

(Optional)

1. The lowest layer is the infrastructure layer and is mostly composed of the physical kit, such
as servers, storage and networking hardware.
2. The middle layer is the platform layer and provides an interface between the applications
and the infrastructure. This layer includes an operating system plus other software that is
needed to write and run applications.
3. The top layer, sometimes called the application layer, includes the data and applications.

PART 3: Programming/Problem Solving Questions [50 Marks]


This part consists of 5 questions. You must attempt all questions.
You should dedicate approximately 80 minutes for this part.
Question 1: [10 marks]
Given the following python codes. What is the output of each code?

a-
# Produce a shape
n=5;
for i in range(n):
for j in range(i):
print ('* ', end="")
print('')

for i in range(n,0,-1):
for j in range(i):
print('* ', end="")
print('')

b-
word = ‘STAR’
for char in range(len(word) - 1, -1, -1):
print(word[char], end="*")
print("\n")

Answer: (10 marks: 6+4)

4/7
TM112 Final Exam Summer 2018-2019
a-
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*

b- R*A*T*S* (deduct 2 marks if the asterisks were not included)

Question 2: [10 marks]

Write a Python program which iterates the integers from 0 to 10 (both included). For
multiples of three print "M3" instead of the number and for the multiples of five print "M5".
For numbers which are multiples of both three and five print "M35".
Sample Output:
M35
1
2
M3
4
M5
… etc

Answer: (10 marks)


- 2 marks for the proper loop with a proper range.
- 6 marks for satisfying the conditions
- 2 marks for printing properly as per condition.

The below code is one of the solutions. The student might write a different
code. It’s up to the tutor to judge and award marks.

5/7
TM112 Final Exam Summer 2018-2019
Question 3: [10 marks]
Given the truth table below:

a) Fill in the empty fields after copying the truth table to your answer booklet .
b) What is the relation between F and G?

Answer: (10 marks: 7+3)

a) 7 marks: 1 1 2 1 2

b) F is the negation of G or F=NOT G [2 marks]

Question 4: [10 marks]

The logical size of a given file is 3072 bytes in a magnetic disk with the following structure:

Each sector is fixed at 512 bytes, and each cluster consists of 4 sectors.

a. How many clusters will the above file take?

b. What will the physical size of the above file be (in bytes)?

c. What is the slack space in this case?

Answer: (4+3+3)

a. The number of clusters the file will require is 3072/ (4*512) = 1.5.

6/7
TM112 Final Exam Summer 2018-2019
Hence, the file will need 2 clusters.
b. The physical size of the file will be 2048 *2= 4096 bytes
c. The physical size of the file is 4096B. Hence, the slack space in this case is 4096B-3702B
= 1024B

Question 5: [10 marks]

Calculate the needed time, in milliseconds, for a signal to reach the Earth’s surface from a GPS
satellite, knowing that the GPS satellite is 21,000 kilometers from Earth's surface and the radio
signal travels at the speed of light, which is 3×108 m/s.
Show your detailed calculation process

Answer: (10 marks)

21000 km = 21000 000 m = 21 × 106 m (2 marks)


Since speed = distance / time (2 marks)
Time = distance / speed (2 marks)
21 × 106
= = 0.07 sec (2 marks)
3×108
= 70 ms (2 marks)

___________________________________________________________________________
END OF EXAM

7/7

You might also like