[理工] [計組] ch2 關於memory address的問題

看板Grad-ProbAsk作者 (AG)時間15年前 (2011/01/13 13:24), 編輯推噓2(205)
留言7則, 4人參與, 最新討論串1/1
97 中山資工 How many ,e,ory accesses are required to execute a "store" instruction with memory indirect addressing ? ans : 含IF則是3 不含則是2 (我算的結果都少1...) 95 清大電機 What is x if the maximum number of memory words you can use in a 32-bit MIPS machine in a single program is expressed as 2^x ? (Note:MIPS uses a byte addressing scheme.) ans : x = 26. 我是這樣想的 1 byte = 8 bit, 1 word = 4 byte x = 32 - lg(8) - lg(4) = 27 可是還是少1... 不知道我哪裡想錯了?? 先謝謝大家了~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.32.69

01/13 13:29, , 1F
1.因為indirect addressing mode
01/13 13:29, 1F

01/13 13:29, , 2F
2.MIPS一個程式可用的最大區塊是256MB
01/13 13:29, 2F

01/13 14:52, , 3F
也就是說當2^x>256MB, 就全當作256MB了?
01/13 14:52, 3F

01/13 15:24, , 4F
256MB=2^28 byte =2^26 Word
01/13 15:24, 4F

01/13 23:31, , 5F
jump 後面有26bit可以設定 address
01/13 23:31, 5F

01/13 23:31, , 6F
然後是以word為單位 所以最多26bit~ 應該是這樣
01/13 23:31, 6F

01/14 11:17, , 7F
謝謝樓上的大家 :)
01/14 11:17, 7F
文章代碼(AID): #1DBeo0U4 (Grad-ProbAsk)