Answer:
A. index bits = 2, tag bits = 2, block offset bits = 1, it is a miss.
B. index bits = 2, tag bits = 1, block offset bits = 0, it is a hit
C. the miss rate is 0
Explanation:
a. number of blocks = 12
number of blocks per set = 3
number of set = number of blocks / number of blocks per set = 12/3 = 4
word size = 24
block size = 2
the block offset = [tex]log_{2}[/tex] block size
= [tex]log_{2}[/tex] 2 = 1
the index bits = [tex]log_{2}[/tex] number of set = [tex]log_{2}[/tex] 4 = 2
the tag bits = ([tex]log_{2}[/tex] word size) - offset - index = ([tex]log_{2}[/tex] 24) -2 - 1 = 5 -2 - 1 = 2
b. word size = 8
block size = 1
the block offset = [tex]log_{2}[/tex] block size
= [tex]log_{2}[/tex] 1 = 0
the index bits = [tex]log_{2}[/tex] number of set = [tex]log_{2}[/tex] 4 = 2
the tag bits = ([tex]log_{2}[/tex] word size) - offset - index = ([tex]log_{2}[/tex] 8) -2 - 1 = 3 - 0- 2= 1