4.8k views
4 votes
Memory: 5 bit addresses Cache: 8 blocks All memory locations contain valid data If the memory location is 15. What is the Binary Address and cache block # If the memory location is 9 What is the Binary Address and cache block # If the memory location is 12 What is the Binary Address and cache block #

User Secondubly
by
5.9k points

1 Answer

2 votes

Answer:

see explaination

Step-by-step explanation:

If the cache contains 2k blocks, then the data at memory address i would go to cache block index ( i mod 2k )

Memory address = 5 bit

Cache block = 23

So, if the memory location is 9, then binary address = 01001 and cache block = 9 % 8 = 1 = 001

if the memory location is 12, then binary address = 01100 and cache block = 12 % 8 = 4 = 100

if the memory location is 15, then binary address = 01111 and cache block = 15 % 8 = 7 = 111

User Bioinfornatics
by
5.8k points