- #1
twoski
- 181
- 2
Homework Statement
A 1-address computer is one whose instruction can contain at most one operand address. MARIE is an example of such a computer. Typically each instruction is stored as a single word in the memory. Assume the following machine details.
(i) A word contains n bits, and k bits (k < n) are used to encode each opcode. The remaining bits are used to specify memory address(es).
(ii) There are 100 distinct opcodes in the ISA.
(iii) The largest program requires 128M words of memory to run.
(a) What is the minimum value of k required? What is the minimum value of n required? Keeping minimum value of k, what is the maximum number of opcodes that can be used?
(b) If the size of each word must be an integer number of bytes, what is the minimum value of n required? What is largest memory that can be used in this computer then?
The Attempt at a Solution
A) The minimum value for k is 7 since the ISA has 100 distinct opcodes. The minimum value for n is 9 since the lowest possible size for instructions is 1 bit (our professor's slides say that possible sizes for instructions are 8,16,32 or 64 and i don't think having 1 bit for the address makes any sense). If k = 7, then the maximum amount of opcodes is 128.
B) I don't get this... It's saying that i can only have 8/16/32/etc bits which i have already assumed. Did i miss something?