Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number of bits needed for cache indexing and the number of tag bits are respectively.


 Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number of bits needed for cache indexing and the number of tag bits are respectively.

(A) 10, 17

(B) 10, 22

(C) 15, 17

(D) 5, 17

 

Explanation:

32 bytes per block, = 2^5, w = 5,

cache size = 32 Kbytes = 32 × 2^10 = 2^5× 2^10 = 2^15,

Size of tag = 32 − 15 = 17.

Cache index = 32-5-17=10.

 

Leave a comment

Your email address will not be published. Required fields are marked *