IICT - FinalPaper-Final Version
IICT - FinalPaper-Final Version
IICT - FinalPaper-Final Version
1
7
Part 1: Mark the correct answer(s) for each of the following questions / statements. Please note
that multiple answers might be correct.
2) The register that keeps track of the instructions in the program stored in memory is:
a) MAR Register
b) Program Counter
c) Current Instruction register
d) Status register
Part 2:
1. Fill out the following table [6]
Decimal Binary Hexadecimal
48 0011 0000 0030
109 0110 1101 006D
702 101011 1110 2BE
2. Convert the following. ASCII table is given as last page at the end. [6]
Text 4 Byte Binary ASCII Code
wint 01010111 01101001 01101110 01110100
87 105 110 116
6. What is the Maximum unsigned integer value that can be represented using 2 Bytes?
[2]
2 -1 = 65536
16
7. If you have an RGB image of size 300x300 then how much space (in Bytes) it would take
in computer memory? [2]
90, 000 x 3 OR 270, 000
Part 3:
1. How many fetch-execute cycles will be performed if speed of processor is 700MHz. [2]
700 X 106 = 700 x 10242 = 734 003 200 OR 700 x 220
7. Consider the set of 5 processes whose burst/service times are given below. [6]
a. Draw a Gantt chart to show turnaround time for Round Robin CPU scheduling with time
quantum
of 2 units.
b. Draw a Gantt chart to show turnaround time for Shortest Job Next CPU scheduling.
c. Also find the average turnaround time for each (RR and SJN).
Process Id Service-Time
P1 6
P2 5
P3 2
Round Robin
8. Given the following memory map, fill the following table of memory map with
jobs/processes numbers. Jobs/processes arrive as job1, job2, job3, job4 and job5
sequentially. [5+5]
Part 4:
1. Write SQL queries for the table given. [10]
WID FIRST_NAME LAST_NAME SALARY CITY DEPARTMENT
001 Ali Imran 100000 Lahore HR
002 Sajid Khan 80000 Karachi Admin
003 Ali Waqas 150000 Karachi HR
004 Karim Zahid 50000 Karachi Admin
005 Kamran Jamal 250000 Lahore Admin
006 Waqas Shahid 90000 Lahore Account
007 Abdul Raheem 75000 Karachi Account
008 Hamid Khan 90000 Lahore Admin
a) List all those records where salary is above 85000. How many records will be displayed?
Update table
Set city = “karachi”
Where firstname = “waqas” AND lastname=”shahid”
5. Given the graph below, use method discussed in class to find the shortest path from
the top left corner vertex/node (v1) to the bottom right vertex/node (v6). Write
number for all the vertices/nodes accordingly. Give the length of the shortest path.
[6+2]
1-4-2-5-3-6 = 12
8. Create adjacency matrix for the following graph. Assume that each link has
weight 1. [4]
1 1 0 0
0 0 1 0
0 0 0 1
0 1 1 0
9. Create a simple html web page (write html only) for the following specifications.
[5+2]
a. A text “A Simple Web Page” as heading.
b. An image showing in the middle of the page.
c. A paragraph explaining the purpose of the page.
d. “FAST-NU” as title of the page
e. A link which on clicking takes you to another page.