The Gateway to Computer Science Excellence
+3 votes
A computer has 256 K word memory. The instruction format has 4 fields i.e., Opcode, register field to represent one of the 60 processor registers, mode field represent one of 7 addressing modes and memory address field. How many instructions the system supports when a 32- bit instruction is placed in the one memory cell.
in CO and Architecture by Active (1.6k points) | 706 views
Are you sure you have written the complete question? It is from ME right?

Yes this is the complete one.


Oh okay..but there is one exactly similar question in one of the test series..there it was mentioned that the memory is byte addressable and each word is of 32 bits.

Without these info i think we have to make assumptions.

It's answer would be 32 right?
The answer for my question is 8.
The answer for your question has to be 32 as the bits for opcode will be 5 which means total 32 instructions.

Each word is of 32bits i.e.. 4B.

And it is given that total number of  words in the memory is 256K. So size of memory is 256K * 4B = 218*22B=220B.

Since the memory is byte addressable(given) so each Byte is assigned one address so total no. of addresses = 220. Hence the memory address field is 20.

So no. of bits for opcode = (no. of bits per instruction)-no.of bits for(reg+mode+memory address) = 32-(6+3+20) = 3

Hence no. of opcodes= 23=8.


MiNiPanda ,

I cover most of the topics from CO but I observe that from  DMA(Direct memory access) and this type  of numerical questions are most asked in gate  ,  But i couldn't understand how to solve this types of question specifically 

please give me some  notes  or youtube link or any kind of resource from where I can understand  the concept  and know  how to solve this kind of questions

thank you



Yeah the DMA and I/O thing trouble me a lot!! -_-  I couldn't find any source till now that can totally clear my concepts..

But yes gatebook lectures(you can find it on YouTube) have helped me to some extent atleast..the rest I have to do on my own.. I think we should read it from some standard book to gain clarity..

Try studying from Carl Hamacher..i have heard that it is good.. :P

8 is the correct one for yours question but for my question, isn't the answer has to be 32. As it is mentioned "when a 32- bit instruction is placed in the one memory cell."
Can you please show your calculations? I am having a doubt..

Check this.


Have you checked this out?

Sumit Singh Chauhan

Sorry for the late reply.. i think you are correct...

Since memory isn't mentioned to be "word addressable" anywhere I have read that it should be considered as byte addressable even if memory is given in terms of words(like here 256K words)..

when a 32- bit instruction is placed in the one memory cell

I had a doubt understanding this memory cell is one word here then?



I think it means to say the memory is word addressable. But not sure of this.
I am quite confused in these questions. The one you shared and the one I have both gave us the memory in words. So, do we have to multiply it with 256k to get the memory address bits?
Got a bit clarity on this, so sharing with you.

Your question clearly says that memory is byte addressable and they mentioned memory size in words, therefore they mentioned the word size as well.

My question looks like word addressable as they didn't mentioned the word size here. The line which confused you is giving the instruction size not the word size.

So this way the solution to your question is 8 and mine is 32.
0 it :)

1 Answer

+4 votes


instruction format (32- bit instruction):

Opcode Register Addressing Mode Memory Address

A computer has 256 K word memory i.e. memory is word addressable.

 60 processor registers will require 6 bits (60 < 26)

7 addressing modes will require 3 bits (7 < 23)

memory address field will require 18 bits

so opcode will have 32 -(6+3+18) = 5

so maximum instructions the system supports = 32

by Active (3.7k points)
What is there are no addressing mode bits present in instruction, then how many modes are possible?

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,833 questions
57,742 answers
108,055 users