Question

I'm revising for an exam and i've came across a question that I have no idea how to do, i've looked through my notes and cant seem to find anything on it, can anyone help me?

Given a 64KB cache that contains 1024 blocks with 64 bytes per block, what is the size of the tag field for a 32-bit architecture?

The question is only worth 1 mark so i cant imagine the answer is too hard, but i cant seem to find anthing on it.

Was it helpful?

Solution

You need 32 bits for the address. You need 6 bits for the offset within a block. You need 10 bits to identify one of the 1,024 possible blocks in the cache. That's 16 bits in total. Therefore the tag needs to be 32 bits - 16 bits = 16 bits.

I recommend following the link that aruisdante provided and look at how to calculate this yourself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top