317 views
3 votes
3 votes

Consider a machine with a byte addressable main memory of 248 bytes divided into blocks of size 64 bytes. Assume that a direct mapped cache having 2k cache lines is used with this machine. The size of the tag field in bits is ________

here ans < tag,line no,bo>  = 37,5,6  right?

given ans is 31,11,6 

please correct  me 

1 Answer

0 votes
0 votes

Main memory = $2^{48}$ bytes divided into blocks of size $64$ bytes. $\Rightarrow $ No of blocks = $2^{42}$

Direct mapped cache having 2k cache lines $\Rightarrow$ $2^{11}$ lines each of size $64$ bytes

Total size of cache = $2^{17}$ Bytes

Therefore a memory address will look like 

31(Tag bits for identification) 11(line offset) 6(Byte offset)