[理工] 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