Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

計算機組織第二次作業

 繳交時間方式:112/05/17 9:00AM 前上傳到 M 園區,除非住院(必須在出院後繳交住院證明),其它不論任何原因(例如隔離)都必須準時繳交,


逾時一律不得補交且以零分計算。
 必須手寫或觸控筆書寫(不可打字)。書寫時以全白的 A4 大小的格式書寫,掃描上傳時沒有書寫的空間必須是純白(不可是灰色),若造成閱讀
者看不清楚(該份作業書寫者與批改者之外的第三方判讀,若無法在 3 秒鐘內讀出正確的書寫字或符號,則視為無法閱讀),該題以 0 分計算。
 同學間可以討論,但不可抄襲,抄襲與被抄襲者皆以零分計算。 Output(Mux 1)
 若題目錯誤,不送分,必須在答案卷中指出錯誤處才給分。

1. (共 11%) 你的 (a) [3%] 學號、(b) [3%] 姓名、(c) [5%]以 pdf 檔上傳答案卷並以「第二次作業-Bnnnnnnn-XXX」為答案卷檔名,Bnnnnnnn 為


學號,XXX 為姓名,-為減號。例如: 第二次作業-B1234567-林作俊。
2. (共 89%) 請參考下圖回答問題。假設目前 PC 的內容為(00400008)16。 (a)[5%] Write the instruction fetched from the Instruction memory in
assembly language. (b)[84%] Give the value of the line signals in Table A (以二進數表示) and Table B (以十六進數表示).

Table A: 以二進數表示 Table B: 以十六進數表示


ALUSrc ALUOp1 Output(ALU control) Output(Shift left 2)
MemtoReg ALUOp0 Read data 1 (Register) Output(Adder 2)
RegWrite Zero(ALU) Read data 2 (Register) Output(Mux 3)
MemRead Output(AND) Output(Mux 2) Output(Mux 4)
MemWrite Output(Mux 1) Output(Adder 1) Read data (Data memory)
RegDst Instruction[25-21] Output(Sign-extend) Write data (Data memory)
Branch Instruction[31-26] Output(ALU) Read address (Instruction Memory)

Instruction Memory Data Memory Register File


(address)16 (content)16 (address)16 (content)16 (register)16 (content)16
00400000 02300004 10000000 0001000A PC 00400008
00400004 17800001 10000004 00000003 $s0 10000000
00400008 8E300004 10000008 00012007 $s1 10000010
0040000C 03300005 1000000C 0000000A $s2 10000100
00400010 2130100A 10000010 01023007 $s3 1040C000
00400014 41200004 10000014 0000000A $s4 10400000
00400018 80300006 10000018 00000001 $s5 11400000
0040001C 6E300001 1000001C 00000025 $s6 40400000

You might also like