Question
The size of the physical address space of a processor is bytes. The capacity of a cache memory unit is bytes. The cache block size is bytes. The cache memory unit can be built as a direct mapped cache or as a -way set-associative cache, where and . Let the length of the TAG field be bits for the direct mapped cache, and bits for the set-associative cache.
Which one of the following options is true?
Official answer and solution
- Official answer
- A
- From
- Official GATE 2026 answer key
Solution
Compute the number of cache lines, number of sets, index bits, and tag bits for both cache organizations.
- Physical address length bits; block offset bits.
- Number of cache blocks (lines) .
- Direct-mapped cache: Index field bits, so tag length bits.
- -way set-associative cache (): Number of sets , so the set index field has bits and the tag length is:
Option (A)
Subtracting instead of adding , or using instead of .
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 38 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.