132k views
0 votes
A direct-mapped cache holds 64KB of useful data (not including tag or control bits). Assuming that the block size is 32-byte and the address is 32-bit, find the number of bits needed for tag, index, and byte select fields of the address.

User Ashil John
by
4.9k points

1 Answer

4 votes

Answer:

A) Number of bits for byte = 6 bits

B) number of bits for index = 17 bits

C) number of bits for tag = 15 bits

Step-by-step explanation:

Given data :

cache size = 64 kB

block size = 32 -byte

block address = 32 -bit

number of blocks in cache memory

cache size / block size = 64 kb / 32 b = 2^11 hence the number of blocks in cache memory = 11 bits = block offset

A) Number of bits for byte


log _(2) (6)^2 = 6 bits

B) number of bits for index

block offset + byte number

= 11 + 6 = 17 bits

c ) number of bits for tag

= 32 - number of bits for index

= 32 - 17 = 15 bits

User Halim Bezek
by
5.1k points