Okay.I have problem about cache mapping. Here is the problem .
Memory size is 1 MB
Cache block size is 16 Bytes.
Cache size is 64kb
Since memory is 1 mb=2**20 Bytes.
So we need 20 bits for the one single address .
Since it is byte addressable and each block size is 16 bytes we need for 4 bits the offset
and for the index 64 KB/16 bytes is equal to 2 to the power 12
so we need 12 bits for the index
So remain part goes to the tag and which is 20-(12+4) = 4 bits.
After that I have given address which is 32 bit long in hexadecimal. For example
My question is how to find the tag,index and offset from the above address?