[理工] Register与Memory Size问题

楼主: wayneshiau (Wayne)   2019-04-20 12:04:22
今天看到一题如下,请问要如何计算?
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 请问是如何得出的?
感谢各位!
作者: skyHuan (Huan)   2019-04-20 12:14:00
16 instrs. => op code要4码32 regs => rs/rt要5码所以此type的指令需要4+5+5=14码

Links booklink

Contact Us: admin [ a t ] ucptt.com