It looks like you're new here. If you want to get involved, click one of these buttons!
Username: abc
Vu id: bcxxxxxxx
Answer no 1:
1. How much time will each processor take to execute program A?
ET = IC * CPI * T = 8.5 * 10-6 seconds ET = IC * CPI * T = 50 * 1.2 * 15*10-8 = 9.0 * 10-6 Seconds
2. How much time will each processor take to execute program B?
ET = IC * CPI * T = 40 * 1.7 * 10-7 = 6.8 * 10-6 seconds ET = IC * CPI * T = 40 * 1.2 * 15*10-8 = 7.2 * 10-6 Seconds
3. Which of the two processors will execute program A faster?
Processor A
4. Which of the two processors will execute program B faster?
Processor A
Question no 2:
Write the instructions for both 3-address and 0-address machines to evaluate the below given expression. z = (((a b) 100) + d) – (a+b)*c
Solution:
PUSH a PUSH b MUL PUSH 100 MUL PUSH d ADD PUSH a PUSH b ADD PUSH c MUL SUB POP z
(b)
MUL r, a, b MUL s, r, 100 ADD t, s, d ADD x, a, b MUL y, x, c SUB z, t, y
Comments
McQs from handout and from past waqar papers mostly
1. MATHS ARTS k 3 solutions batany thy, jo k chapter 6 me hy handouts me
2. knapsack se tha. Using dynamic algorithm (3)
3. How Bubble sort algorithm work(5)
4. Properties of algorithms (5)
MCQs Mostly from pastpers
2 qs marks 3 and 3 qs marks 5
1Sorting and write its types5 marks
2 Counting sort numbers are given.. 5 marks
3.Any Program.. i dont know this qs..5 marks
4. Edit Transcript.. 3 marks
5. Upper bound and lower bound