Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) Consider a program that takes 16 sec to execute. It has two parts A and , whe

ID: 3906899 • Letter: 1

Question

1) Consider a program that takes 16 sec to execute. It has two parts A and , where Part A runs for 9 sec and Part B runs for 7 sec. Sam discovered that with same cost part A can be improved to run 3 times faster, OR part B can be improved to run 7 times faster (but both parts cannot be improved at the same time). Which part should be improved to get better overall performance?

a. Part A, because it takes longer time to execute- make common case faster

b. Part B, because it can be improved to run 7 times faster

c. Either A or B ; both improvements give same overall performance (10 sec)

d. Neither A nor B; based on Amdhal’s law the overall performance cannot be improved

If 110b= 1210, what is b (in base 10)?

a. 8

b. 4

c. 3

d. 2

What is 11.510 in Hex?

a. B.5                

b. B.8                  

c. 11.8

d. 8.5

What is 11.012 in Hex?

a. 3.01

b. 3.4

c. C.4

d. C.8

Explanation / Answer

Answer: c. Either A or B ; both improvements give same overall performance (10 sec)

Explanation
If Sam chooses to make A 3 times faster, then execution time of A will be 9/3 = 3. In this case, the overall time for A(3) and B(7 unchanged ) = 3 + 7 = 10
If Sam chooses to make B 7 times faster, then execution time of B will be 7/7= 1. In this case, the overall time for A(9 unchanged) and B(1) = 9 + 1 = 10

Answer: c) Either A or B ; both improvements give same overall performance (10 sec)

=============

If 110b= (12)10, what is b (in base 10)?
Answer: c. 3

=============
What is (11.5)10 in Hex?
Answer: B.8

========
What is (11.01)2 in Hex?
Answer: b. 3.4