This assignment is due by midnight, February 9 Submit it by sending email to me at the address, vickery@babbage.cs.qc.edu. Be sure to put "CS-343 Assignment 2" in the subject of your email and to put your name/ID in the message body.
I prefer it if you put your answers inline in the body of your message instead of as an attachment. And I prefer plain text over HTML or word processor documents.
Twice as long, 20 sec.
If A is 60% faster, it is 1.6 times faster. That means that the execution time for B divided by the execution time for A is 1.6. Since the time for A is 10, the time for B will be 1.6 / 1 = B / 10, and B = 16 seconds
The wording is arguably ambiguous. Presumably the statement means that B is 40% finished with the program when A finishes all of it. So B's execution time is given by 0.4*B = 10, which means B's execution time will be 25 sec.
This is another example of awkward wording. Presumably twice as slow means half as fast. So B will take 2 * 10 = 20 sec to complete the program.
This is a weighted average problem. The weights are 0.2 for load/store, 0.5 for fixed-point, and 0.05 for floating point. Since the weights have to sum to 1.0, the weight for branches is 0.25. Therefore failed branches account for 0.25 * 0.15 = 0.0375 and the weight for successful branches is 0.25 - 0.0375 = 0.2125. So the average is (0.2*2)+(0.5*1)+(0.05*8)+(0.2125*1)+(0.0375*2) = 1.5875 clock cycles per instruction.
Execution time S/P = S/C * C/I * I/P (Seconds, Clocks, Instructions, Program). The period (S/C) is 1/(2*109) sec (0.5 nsec or 500 psec), so the total execution time is 0.5*10^-9 * 1.5875 * 3000000 = 0.002379 sec, or 2.379 msec.
The period of a 1.5GHz clock is 1/(1.5*109) = 1/1.5 * 10-9 = 0.667 * 10-9 = 667 * 10-12, which is 667 psec. Dividing 667 by 7, the maximum delay per gate is 95.286 psec.
There would be 5 * 12 = 60 psec delay time in the logic network, so the inputs could be driven by a clock with a period of 60 psec or more. The frequency of a 60 psec clock is 1/60*10-12, which is 1/60 * 1012 = 0.016 * 1012 = 16 * 109. So the maximum frequency would be 16GHz.
log2(1024) is 10, so each register number requires ten bits, for a total of 30 bits.
1G is 20 * 230, or 230. And log2(230) is 30. So 30 bits are needed.
16M is 24 * 220, or 224. And log2(224) is 24. So 24 bits are needed.