SafiullahRehmani - 12413 Mid Term Paper IICT (105726)
SafiullahRehmani - 12413 Mid Term Paper IICT (105726)
SafiullahRehmani - 12413 Mid Term Paper IICT (105726)
104912,104909,104911
Class Id 105047-105048-49 Course Title IICT
104910-105726
Program BSCS Campus / Shift Main Campus / Morning
th
Date 22 – October 2020 Total Marks 50
Duration 02 hours Faculty Name Azam Khan, Siraj Munir, Ali Babar
Student Id 12413 Student Name Safiullah Rehmani
Instructions:
• Filling out Student-ID and Student-Name on exam header is mandatory.
• Do not remove or change any part of exam header or question paper.
• Write down your answers in given space or at the end of exam paper with proper title “Answer
for Question# _ _”.
• Answers should be formatted correctly (font size, alignment and etc.)
• Handwritten text or image should be on A4 size page with clear visibility of contents.
• Only PDF format is accepted (Student are advise to install necessary software)
• In case of CHEATING, COPIED material or any unfair means would result in negative marking
or ZERO.
• A mandatory recorded viva session will be conducted to ascertain the quality of answer scripts
where deemed necessary.
• Caution: Duration to perform Mid-Term Assessment is 02 hours only. Extra 01 hours are given
to cater all kinds of odds in submission of Answer-sheet. Therefore, if you failed to upload
answer sheet on LMS (in PDF format) within 03 hours limit, you would be considered as
ABSENT/FAILED.
• Understanding the questions is the part of assessment.
• All questions are correct if you think there is any mistake so take your assumption and try to
solve it.
• This paper is open book but not open discussion, so you can use book and class lectures for
getting help but copy paste from any source (lecture slides, book, internet, blog etc.) is strictly
not allowed if you found doing such stuff you’ll get 0 marks. To avoid such conditions, use your
own wording.
• Restrict your discussions to classroom knowledge.
• Use ENTER to accommodate space for your answer.
• All aforementioned policies will be enforced strictly so don’t take it as a joke.
• Actual Marks are 50/2=25
Question #1: [14 Marks]
Part A: Write the name of the Gate and draw its symbol, in which if the one of its inputs are 1 then it’s
all output will be 0.
Part B: Draw the circuit diagram OR truth table for given equation.
Q= (W ⊕ X) + (Y.Z)’
Part C: Convert the following Numbers into target number system. Show all necessary calculation.
• 6428= ? 10
• 97BF16= ?2
• AEF16= ?8
‘_________________________
Your answers:
Part B: Apply Bubble Sort OR Insertion Sort algorithm to the following list. Show all the required steps.
‘_________________________
Your answers:
A=5, B=6
C=0
C=A X B
PRINT C
Explain how types of Machine Instructions OR Machine Cycle will be used to fetch, decode and
execute different type of machine instructions on the above program in CPU. Draw a diagram to
support your answer.
Part B: Why RAM is called volatile memory? Discuss in your own words.
. ‘_________________________
Your answers:
Part A: What do you understand by term LIFO and FIFO, which data structure use these two mechanism
and how? Support your answer with any real life example for both.
OR
Suppose two algorithms A and B runs on same machine to find the factorial of number. Algorithm A
execute in 1 ms, where algorithm B execute in 3 ms, according to you which algorithm is more efficient.
A or B and why? Explain your answers.
Part B: Suppose, in a Stack Top value is 0 and value store at that location is "S" as shown in the following
figure. What will the value of Top after the execution of following Operations? Also show all steps in the
following diagram
.
0
1
2
3
4
6
7 S
• Push("A")
• Pop()
• Push("Q")
• Push(“X”)
• Pop()
• Pop()
• Pop()
• Pop()
• Pop()
____________________________________________________________________
‘_________________________
Your answers:
Best of Luck
Answers
Answer for Ques #1 (a)
Answer for Ques #1(b)
Answer for Ques# 1(c)
Answer for Ques # 2(a)
Primatives:-
Algorithm approaches these problems by establishing a well-
defined set of building blocks. Such building block is called
primitive. The representation of an algorithm requires some form
of language perhaps language of pictures.
Example:-
Process to make a boat from a piece of paper.
Pseudocode:-
A pseudo code is a notational system in which ideas can be
expressed informally during the algorithm development process.
It includes condition, statements, IF, Else, For ,While etc
Example:-
If score is greater than 145 then victory else defeat
• If (condition) then (activity)
else (activity)
Answer for Ques # 3(a)