The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 405 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
consider the following fragment of c code:
for(i=0;i<=100;i++)
{ A[i]=B[I]+C; }
Assume that A and B are arrays of 64-bit integers,and c and i are 64-bit integers.Assume that all data values and their addresses are kept in memory(at addresses 1000,3000,5000,and 7000 for A,B,C and i respectively,except when they are operated on.Assume that values in registers are lost between iterations of the loop?
a.)write the code for MIPS.How many instructions are required dynamically?How many memory-data references will be executed?what is the code-size in bytes?
b.)write the code for x86.How many instructions are required dynamically?How many memory-data references will be executed?what is the code-size in bytes?
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll