作者wayneshiau (Wayne)
看板Grad-ProbAsk
標題[理工] Register與Memory Size問題
時間Sat Apr 20 12:04:22 2019
今天看到一題如下,請問要如何計算?
If the computer has 32 data registers (R0 to R31), 2000 words in memory,
and 16 different instructions. What is the minimum size of an add instruction
in bits if a typical instruction use the following format: add R0 R2
(A) 14
(B) 13
(C) 28
(D) 29
答案是給A 請問是如何得出的?
感謝各位!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.36.233.66
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1555733064.A.511.html
推 skyHuan: 16 instrs. => op code要4碼 04/20 12:14
→ skyHuan: 32 regs => rs/rt要5碼 04/20 12:14
→ skyHuan: 所以此type的指令需要4+5+5=14碼 04/20 12:14