PART ONE PART TWO Suppose that you are working with a CISC machine using a 1.9 G
ID: 3903051 • Letter: P
Question
PART ONE
PART TWO
Suppose that you are working with a CISC machine using a 1.9 GHz clock (i.e., the clock ticks 1.9 billion times per second). This particular computer uses MASM-like instructions with the following timings: add reg, mem 5 clock cycles (i.e., the ADD micro-program has 5 instructions) add reg, immed 3 clock cycles loop label 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. mov bx, e mov ecx, MAX_SIZE initialize loop counter mov esi, OFFSET list ;initialize array pointer ;initialize sum more: add bx, esi add esi, 2 Lo add current list element move array pointer to next element ;auto-decrement ecx, jump to more if ecx 0 op more After initialization, how many array elements can be processed in 3.7 ms? Round your answer to the nearest integer. Note that 1 ms. = 0.001 second.Explanation / Answer
Part 1
Number of clocks in 3.7 ms = 3.7 * 1.9 * 10^9 * 10^-3
one iteration in the loop = 15 clocks
Number of elements = 3.7 * 1.9 * 10^6 / 15 = 0.468666 * 10^6 = 468666
Part 2
Number of clocks in 4.2 ms = 4.2 * 1.9 * 10^9 * 10^-3
one iteration in the loop = 19 clocks
Number of elements = 4.2 * 1.9 * 10^6 / 19 = 4.2 * 10^5 = 420000
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.