How many total bits are required for a direct-mapped cache with 128 KB of data…

2020

How many total bits are required for a direct-mapped cache with 128 KB of data and 1 word block size, assuming a 32-bit address and 1 word size of 4 bytes ?

  1. A.

    2 Mbits

  2. B.

    1.7 Mbits

  3. C.

    2.5 Mbits

  4. D.

    1.5 Mbits

Attempted by 84 students.

Show answer & explanation

Correct answer: D

1. Determine the number of cache lines: 128 KB / 4 bytes = 32,768 lines.

2. Calculate address breakdown: Offset is log2(4) = 2 bits. Index is log2(32,768) = 15 bits. Tag is 32 - 15 - 2 = 15 bits.

3. Calculate overhead per line: Data (32) + Tag (15) + Valid (1) = 48 bits. Total cache size: 32,768 * 48 = 1,572,864 bits (approx. 1.5 Mbits).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro