retagged by
222 views

2 Answers

Best answer
0 votes
0 votes

T10

given ,

2-way set associative

cache lines = 16B = 24 B

Cache Size =  8KB = 213 B

Memory Size = 256 M = 228 B

No of lines in the cache = 2 13 / 2 4 = 29

No of sets = 2 9 /2  = 2 8

Now as we know that ,

16   8   4

   TAG BIT            SET No           Block OFF

 

now ,  given that memory block which is going to mapped on to the cache set 0 ,

No set 0 means all 8 bits has to be '0' right ?? (0 0 0 0 0 0 0 0)

the memory address is given in the form hexadecimal

change it into binary 

observe that (C F E 0 0 B) 16  (B is representing the block offset and 0 0 is representing the set number which is 0)

therefore, (C F E 0 0 B) 16  is the answer

 

similarly, T11

Direct Mapped cache

Memory size =  216 B

No of cache lines = 2 5

Block Size = 23 B

    8   5  3

 TAG BIT             LINE NO        LINE OFFSET

Now , address are given ,

 0001  0001  1001 1001    [10011 ---- > 19 ]

similarly do with remaining

answer should be B )  (19)10   ( 4)10    (13)10

 

selected by
0 votes
0 votes

main memory address = $2^{16}$ bytes 

block size = 8 bytes, block offset = 3 bit

no.of lines = 32, no of bits required to represent line no. = 5 bit

Tag bit = Memory address bit - block offset - line = 16 -  3 - 5  = 8 bit

Given addresses -

$\\ \overset{Tag}{00010001}\,\,\,\overset{Line}{10011}\,\,\,\overset{Offset}{011}\\ \overset{Tag}{11000011}\,\,\,\overset{Line}{00100}\,\,\,\overset{Offset}{100}\\ \overset{Tag}{10101010}\,\,\,\overset{Line}{01101}\,\,\,\overset{Offset}{010}$

Now line numbers are -

 $\\ (10011)_{2}, (00100)_{2}, (01101)_{2} \\ = (19)_{10}, (4)_{10}, (13)_{10}$

Answer B.

No related questions found