看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《lightergogo (賴打葛葛)》之銘言: : http://tinyurl.com/y8bpyg5 : http://tinyurl.com/yeywbgo : 第八題 : 不知該如何下手 : PC值要加4嗎? 我的看法 供參考 301 => Add to AC from 940 => AC = FFFE 302 => load AC from 941 => AC = FFFE + 0002 = 0000 303 => Store AC to 941 => memory[914] = 0000 (感謝lovefo大更正) FFFE + 0002 = 0000 eg. 例如: -2 + 2 = 0 => 110 + 010 = 000 PC值應該是加1就好 PC+4的原因是因為 一個指令長度 32bit = 4bytes (=1 word) 它已經說它是16bit word 且看題目的樣子 memory的位址應該是以word來看 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.136.244.169
jwcs:我是寫 302 AC = FFFE + 0002 = FFFC ,他Data是 2's compl. 03/10 00:09
jwcs:所以我寫最後的 Memory 941 為 FFFC...有錯請指教 >"< 03/10 00:10
Lautreamont:你對 我忘了它有寫2補數表示法 03/10 00:14
※ 編輯: Lautreamont 來自: 220.136.244.169 (03/10 00:15) ※ 編輯: Lautreamont 來自: 220.136.244.169 (03/10 00:15)
lightergogo:為啥不是 301 => Add to AC from "940"? 03/10 00:28
lightergogo:302 => load AC from "941"? 03/10 00:29
※ 編輯: Lautreamont 來自: 220.136.244.169 (03/10 00:31)
Lautreamont:因為我打太快 = = 03/10 00:32
lightergogo:哈 難怪我覺得怪怪的 03/10 00:33
Lautreamont:抱歉 再改回來 03/10 08:14
※ 編輯: Lautreamont 來自: 220.136.244.169 (03/10 08:14) ※ 編輯: Lautreamont 來自: 220.136.244.169 (03/10 08:16)
jwcs:嗯,拍誰,昨晚連加法都加錯 Orz 03/10 08:26