You are on page 1of 2

Reg.

No: Midterm Examination Spring 2022 Date: -- April 2022


_______________
Program: BSCS_________________________________ Class & Section: 3(A,B,C,D)
Course Code & Name: CSC 2201, Computer Organization & Assembly Language Duration: 75 Mins
Instructor’s Name: Dr. Shahzad Latif/Mr. M. Aqeel Anwar___ Total Marks: 25 Marks

Important Instructions:
Read all questions carefully first and then ask for the questions. Question paper related queries will not be
entertained after 30 minutes for mid-term after the start of paper. Do not write anything on question paper
unless until specifically asked for. Question Paper to be returned along - with Answer Sheet.

Possession of Mobile Phone, Smart Watch or any Unauthorized Written Material will Result
in Immediate Cancellation of the Exam, and “F” Grade will be awarded for the entire Course.
-----------------------------------------------------------------------------------------------------------------------------------
Attempt all questions:

Q1: (Marks 06=4+2)

Consider two different machines, with two different instruction sets, both of which have a clock rate of 100
THz. The following measurements are recorded on the two machines running a given set of benchmark
programs:

Instruction Type Instruction Count Cycles per Instruction


(millions)
(Machine A)
Arithmetic and logic 6 3
Load and store 3 4
Branch 2 5
Others 6 5
Machine(B)
Arithmetic and logic 10 2
Load and store 6 4
Branch 2 6
Others 2 4

(a) Determine the effective CPI, MIPS rate for each machine.
(b) Comment on the results which machine is better.
Q2: (Marks=07=4+3)
Consider A benchmark program is run on a 50 MHz processor. The executed program consists of 100,000
instruction executions, with the following instruction mix and clock cycle count:
Instruction Type Instruction Count Cycles per Instruction
Integer Arithmetic 35000 2
Page 1 of 2
Data Transfer 40000 1
Floating Point 20000 4
Control Transfer 5000 3

The above program running on a single processor such that a fraction 0.6 of the execution time involves code
that is inherently serial and a fraction 0.4 that involves code that is infinitely parallelizable with no
scheduling overhead. Let T be the total execution time of the program using a single processor.
(a) Calculate the execution time for the above program.
(b) Calculate the speedup using a parallel processor with 8 processors that fully exploits the parallel
portion of the program by exploiting Amdahl’s law?

Q3: (Marks=06)

Execute the following program using


(a) Stack Architecture Instructions Set
(b) Accumulator Architecture Instructions Set
(c) General Purpose Register Instructions using two address Fields

F= 4(C+D) – (4A+B)

Q4: (Marks=06)

Suppose DH contains (6B)16 hexadecimal, AH=(CB)16 , CF=1, and CL contains 5, What are
the values of DH after the following instructions:

AND DH,AH
RCL DH, CL.
Show the details of your work in the following table format.

CL CF DH

***END**

Page 2 of 2

You might also like