337 views
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).

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

My question is, in this question what is difference between computer has 15 instruction and memory has 50 instructions?
0
will u provide the detail sol plz? i don't know how to solve this problem

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
0
So what is the answer here? Is it 150?

I mean 50 x 3 bytes per instruction??
+1
yes 150
+1 vote
 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

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.

1