I have an excerpt from my textbook concerning direct mapped cache that I would like further clarification on, the text reads.....
"Consider the following example: Assume memory consists of 2^14 words, cache has 16 blocks, and each block has 8 words. From this we determine that memory has 2^14/2^13 = 2^11 blocks.
We know that each main memory address requires 14 bits. Of this 14-bit address field, the rightmost 3 bits reflect the word field (we need 3 bits to uniquely identify one of 8 words in a block). We need 4 bits to select a specific block in cache, so the block field consists of the middle 4 bits.
The remaining 7 bits make up the tag field."
My questions are:
Where does the 2^13 come from when they calculated how many blocks in the first paragraph?
How did they go about identifying that the block field should contain 4 bits? Is this because the cache has 16 blocks and 2^4 is 16?
Thank you for your time!