in CO and Architecture edited by
7,344 views
7 votes
7 votes

Consider a direct mapped cache with $64$ blocks and a block size of $16$ bytes. To what block number does the byte address $1206$ map to

  1. does not map
  2. $6$
  3. $11$
  4. $54$
in CO and Architecture edited by
7.3k views

3 Comments

continue the question
0
0
this question has been asked before and answered as well.( Ans - 11 )
0
0
Which year?
0
0

4 Answers

21 votes
21 votes
Best answer
Block size =$16B$

Total No of Block=$64$

Memory block Number=$\frac{\text{Byte}\ \text{address}}{\text{Block}\ \text{Size}}$

                           =$\frac{1206}{16}$

                          =75

Now we have to find a cache block number related to memory block number.

So In Direct Mapped cache,

$\text{Cache block Number}=\text{Memory block Number $\color{magenta}{\text{mod}\;}$(Total Number of a block  in cache)}$

                                    =$75\;\text{mod}\;64$

                                    =$11$

So option C is correct.
edited by

2 Comments

Cache block Number=Memory block Number mod(Total Numbe

Total number of blocks is 64.

So, Cache block no. = Memory block no. % 64

                                = 75 % 64

                               = 11

1
1
Doubt – 1206 is the byte address in the main memory?
0
0
4 votes
4 votes

block size 16 byte==>

block 0==0 to 15 byte

block 1=16 to 31 byte..

so  floor (byte address / block size) = memory block # 

   floor(1206/16)=75

Then you need to find which cache block memory block 75 maps to. In a direct-mapped cache, cache block # = memory block # mod (total block number of cache) Therefore, 75 mod 64 = 11.

hence C is the ans

by
0 votes
0 votes
•As block size = 16 bytes:

    byte address 1200 Þ block address ë1200/16 û = 75

•As cache size = 64 blocks:

    block address 75 Þ cache block (75 mod 64) = 11 

by
0 votes
0 votes
Given data,
Direct memory cache have = 64 block
Block size = 16 Bytes
Block number does the byte address of 1206 map=?
Step-1: To find block number = Byte Address / Block size
= 1206/16
= 75.3
Step-2: Byte address 1206 map to 75th block.
Step-3: We have to find the cache block number.
Cache block number = (Block number) mod (Block size in cache)
= 75 mod 64
= 11
edited by

3 Comments

Cache block number = (Block number) mod (Block size in cache)

Solving in this way we get wrong answer 

Find block number for byte address 1600

1600/ 16= memory block number=100

Cache block number in memory= 100mod64

                                                         =36

But according to you 4 which is wrong

0
0
bro it's done thanks for correcting me
0
0

Replace block size with total number of blocks in cache memory

0
0
Answer: