2

In my university class, I received this homework assignment on computer architecture, but I don't know how to solve it. I already know that the correct answer is 0, but I don't understand why. Could someone help me?

Problem: The byte-addressable memory has a 16-bit address. The directly addressed cache has 7-bit tags and 8-byte rows. You need to provide the cache row address if the memory address is #8614. The result should be given in hexadecimal, omitting the # sign.

1 Answers1

2

If I understand correctly, your directly-mapped cache has 128 cache lines of 8 bytes. So, in a memory address, the 3 least significant bits (bits [0:3]) are used to compute the location inside the cache line while the rest of the bits are used to target a specific cache line inside the cache. I can only assume that the 7 next bits (bits [3:10]) are used for this purpose. Therefore, memory address #8614 corresponds to byte 4 in cache line #42, because #8614 % 8 = 4 and (#8614 // 8) % 128 = #42.