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

Suppose that you are working with a CISC machine using a 2.4 GHz clock (i.e., th

ID: 3902799 • Letter: S

Question

Suppose that you are working with a CISC machine using a 2.4 GHz clock (i.e., the clock ticks 2.4 billion times per second). This particular computer uses MASM-like instructions with the following timings: add reg, mem 6 clock cycles (i.e., the ADD micro-program has 6 instr uctions add Loop Labe reg, immed 3 clock cycles 7 clock cycles Suppose that the following code fragment is used to sum elements of a numeric array. For this problem, assume that memory limitations are non- existent and that there is no limit to the size of the array ;initialize sum ;initialize loop counter mov bx, 0 ecx, MAX_SIZE mov esi, OFFSET list ;initialize array pointer more: add bx, eSi add esi, 2 Loop , add current List eLement ;move array pointer to next element more ; auto-decrement ecx, jump to more if ecx 0 After initialization, how many array elements can be processed in 2.8 ms? Round your answer to the nearest integer. Note that 1 ms. 0.001 second

Explanation / Answer

There are total 16 cycles for the instructions for the label more:

16 clock cycles

Number of clock cycles in 2.8ms = 2.8 * 10^-3 * 2.4 * 10^9
                                = 6.72 * 10^6

Number of element = 6.72 * 10^6/16 = 0.42 * 10^6 = 420000 elements

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote