Question:

Consider a processor that generates 32-bit virtual addresses. It uses a direct mapped cache whose size is 32 KByte and has 32 Byte blocks. What is the number of bits needed for cache addressing?

Show Hint

Cache addressing bits are calculated as: Index bits + Block offset bits.
Updated On: Feb 8, 2026
  • 5
  • 10
  • 15
  • 20
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Understanding cache parameters.
Cache size = 32 KB = $2^{15}$ bytes
Block size = 32 bytes = $2^5$ bytes
Step 2: Calculating number of cache blocks.
\[ \text{Number of blocks} = \frac{2^{15}}{2^5} = 2^{10} \]
Step 3: Calculating block offset bits.
Block size is $2^5$ bytes, so block offset requires $5$ bits.
Step 4: Calculating index bits.
Number of cache blocks is $2^{10}$, so index bits required are $10$.
Step 5: Total cache addressing bits.
Cache addressing bits = Index bits + Block offset bits
\[ 10 + 5 = 15 \]
Step 6: Final conclusion.
Thus, the number of bits needed for cache addressing is 15.
Was this answer helpful?
0
0