We are given a memory system with the following parameters:
- Main memory size: $1~\text{M bytes} = 2^{20}$ bytes
- Cache size: $16~\text{K bytes} = 2^{14}$ bytes
- Cache block size: $16$ bytes = $2^4$ bytes
- Address width: $20$ bits (byte-addressable)
- Cache organization: Direct-mapped
In a direct-mapped cache, each memory block maps to exactly one cache line based on its index.
- Number of cache lines (blocks) = $\frac{\text{Cache size}}{\text{Block size}} = \frac{2^{14}}{2^4} = 2^{10}$
So, there are $2^{10}$ cache lines.A 20-bit address is partitioned into:
$$
\begin{array}{|c|c|c|}
\hline
\text{Tag} & \text{Index} & \text{Offset} \\
\hline
\end{array}
$$
- Offset: determines byte within a block → $\log_2(\text{block size}) = \log_2(16) = 4$ bits
- Index: selects which cache line → $\log_2(\text{number of lines}) = \log_2(2^{10}) = 10$ bits
- Tag: remaining bits → $20 - 10 - 4 = 6$ bits
Thus, each cache line stores a 6 bit tag. Since there are $2^{10}$ cache lines, and each requires 6 bits for its tag:
$$
\text{Total tag storage} = 6 \times 2^{10} \text{ bits}
$$
$$
\color{lime} \boxed{\text{A. } 6 \times 2^{10}}
$$