The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+3 votes
532 views
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.5k points) | 532 views
0
Are you sure you have written the complete question? It is from ME right?
0

Yes this is the complete one.

0

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.

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

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.

0

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

0

Magma

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

0
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."
0
Can you please show your calculations? I am having a doubt..
0

Check this.

0
@MiNiPanda

Have you checked this out?
0

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 line..one memory cell is one word here then?

 

 

0
I think it means to say the memory is word addressable. But not sure of this.
0
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?
+1
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
Okay..got 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.6k points)

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,093 questions
55,333 answers
190,852 comments
86,257 users