in CO and Architecture
2,170 views
4 votes
4 votes
A computer has 170 different operations. Word size is 4 bytes one word instructions requires two address fields. One address for register and one address for memory. If there are 37 registers then the memory size is ______________(in KB).

Ans. 256KB
in CO and Architecture
by
2.2k views

4 Comments

edited by

@Na462(I don't know your real name) :)

when I say memory is of k bits it means that total 2^k words are present and by default every word is of 1 bytes so total 2^k bytes are there,with address given to every byte.
 

There is nothing like that.
By default, we consider memory is Byte Addressable. So when you say memory address is of k bits, it means $2^k$ bytes are there.
And if say word size is 4 byte then $\frac{2^k}{4}=2^{k-2} \ words$ are there.

But if it is given in the question that memory is word addressable then only you can say that memory address is of k bits, it means $2^k$ words are there.
And if say word size is 4 byte then $2^k*4=2^{k+2} \ bytes$ are there.

2
2
Oh thanku so much Soumya that was really important thing you corrected in me. Thanx a lot :)
1
1

It is common to have byte addressability, and access words. A word address is defined to be the smallest byte address of the bytes within that word. 

https://pages.cs.wisc.edu/~markhill/cs354/Fall2008/notes/addressibility.html 

0
0

2 Answers

3 votes
3 votes
Best answer

Given answer is right.

selected by

2 Comments

How that op and reg are 8 and 6
0
0
opcode represent the what type of operation which it is and it is given that there are 170 instructions so to represent 170 instructions we need 8 bits.

there are 37 registers to represent those registers we need 6 bits .
0
0
0 votes
0 votes
256 KB is the answer.

Related questions