106k views
4 votes
How many total bits are required for a direct mapped cache with 16 KB of data and 4 word blocks Assuming a 32 bit address

User Bddicken
by
5.7k points

1 Answer

1 vote

Answer:

147 Kibibits or 18.4 KiB

Step-by-step explanation:

Given that KiB = kibibyte = 2^10 bytes

Hence 16 KiB is 16384 (2^14) bytes = 4096 (2^12) words.

Therefore, with a block size of 4 words (2^2), we have 1024 (2^10) blocks

Given 32 bits address

We have 4 x 32 = 128 bits of data

The total bits is calculated as (number of blocks) * (data (32 * 4) + tag and validation bits)

Where index part = 10 bits, Offset = 2 bits

2^10 * (4 x 32 + (32–10–2 - 2) + 1)

=> 2^10 * 147 = 147 kibibits

=> 18.4 KiB

User DiegoFrings
by
5.5k points