590 views
1 votes
1 votes

In a direct cache controller each main memory address can be viewed as consisting of three fields. The least significant  bits identify a unique word/byte within a block. The cache logic interprets the remaining ‘s’ bits as a tag of (s – r) bits (most significant portion) and a line field of ‘r’ bits. What is the size of main memory and cache memory respectively.

Ans. 2^(s+w) bytes/word and 2^(r+w) bytes/word

1 Answer

Best answer
1 votes
1 votes

Look brother the main memory has Tag and word offset...now when we do cache mapping we further divide Tag of main memory into Tag and Line offset of cache memory.. and cache memory is not part of main memory it has its own memory area and its addressing is different from main memory..so we do such cache organisation for mapping address of main memory in cache..cache memory is small i.e why it stores some tag bits in tag directory of cache..see the image you will get it..for direct mapping this is the way memory is organised..!

selected by