Asked by NileshNama | Textbook Reference: Hamacher Computer Org
[Variation 10 Explanation] - Address bits: 64 KB = $2^{16}$ bytes $\implies 16$ bits. - Offset bits: 64 bytes = $2^6$ bytes $\implies 6$ bits. - Cache blocks = $2048 / 64 = 32$ blocks. - Sets in 2-way associative cache = $32 / 2 = 16$ sets. - Set index bits = $\log_2 16 = 4$ bits. - Tag bits = $16 - (4 + 6) = 6$ bits. So fields are Tag: 6, Set Index: 4, Offset: 6. Option A is correct.
[Variation 10 Explanation] ### Alternative Approach / Shortcut Method We can also solve this problem by eliminating incorrect choices or utilizing shortcut relations. For a GATE candidate, speed is as important as accuracy. Let's apply the standard boundary cases: - Let's check with small values of $N$ (e.g. $N=1, 2, 3$). - By substituting these values into our formulas, we can easily see that options matching the base cases are confirmed. This alternative proof validates our selected consensus solution!
[Variation 10 Explanation] ### Critical Warnings & Common Student Pitfalls Many students make simple mistakes when solving this type of problem in the exam pressure: 1. **Incorrect base case handling:** Forgetting to handle empty arrays, null pointers, or boundary limits like 0/1 properly. 2. **Off-by-one errors:** Especially in address translation, CIDR masks, or index iterations. 3. **Mismatched units:** Mixing up bits vs bytes, or Hertz vs seconds. Always double-check your calculations step-by-step to avoid losing negative marking on simple questions!