2,458 views
2 votes
2 votes
Consider a computer has 64 registers and support 15 different instructions. Each instruction has 4 fields i.e. opcode, source register, destination register and immediate value of 6 bits. If each instruction in byte aligned and 50 instructions are present in memory, then the size of memory needed to store these instructions are ________ (in byte).

-----------------------------------------------------------------------------------------------------------------------------

I know the answer

My question is, in this question what is difference between computer has 15 instruction and memory has 50 instructions?

3 Answers

Best answer
7 votes
7 votes

My question is, in this question what is difference between computer has 15 instruction and memory has 50 instructions?

CPU/Processor has 15 Instructions mean "15 Instruction Types..i.e. Instruction set has 15 types of instructions or you can say 15 Opcodes... like ADD, MUL, DIV, MOV, LOAD...etc"

 Memory has 50 instructions mean that the Program stored has 50 Instructions....like there could be ADD 10 times, JMP 20 times..etc..

selected by
3 votes
3 votes
Opcode Rs Rd Imm.

instruction size = (opcode)+Rs + R+ immediate value = 4+6+6+6=22bits

memory is byte a=Addressable  so we will need 24 bit or 3 Bytes

there are 50 instructions in program so memory needed =  3 * 50 bytes = 150 Bytes

0 votes
0 votes
Computer supports 15 different instruction, it means our Opcode could be 15, that is we have 15 different operations like DIV, MUL, ADD, SUB etc.

And there are 50 instructions in memory, that is Program has 50 such instruction in which Opcode can have 15 different operations.

Related questions

12 votes
12 votes
3 answers
2
0 votes
0 votes
1 answer
3
someshawasthi asked Oct 27, 2022
503 views
Assume an instruction set that uses a fixed 31 bit instruction length. Operand specifies are 4 bits in length. If there are m-three operand instructions in total, then ho...