# Query Regarding Direct cache mapping [closed]

Thank you for looking into this, I have a problem regarding direct cache mapping, My problem really though is with the question formation itself and the problem I am about to present seems to have inconsistency and has unclear description. So the problem is as follows ( I am presenting exactly as given )

32 bit architecture
Main memory size = 8GB
cache size = 512KB
Block size = 32 words

To Find

1. Number of bits required for Byte Offset = ?
2. Number of bits required for main memory address = ?
3. Number of bits required for main memory block number = ?
4. Cache Index bits = ?
5. Tag-bits = ?
6. Size of Tag Directory = ?

Now My Interpretation of the solution is as follows

1. Block size is $$32 \text{words} = 2^5$$ . That, means that you need, 5 bits for offset.
2. $$\#\text{blocks}=\frac{2^{19}}{2^5}=2^{14}$$, so you need 14 bits for the index ( to indentify which block in cache is going to represent your wanted memory adresss )
3. For a 32 - bit adress, tag is the rest : $$32 - 14- 5 = 13$$ bits.