A computer system with a word length of 32 bits has a 16 MB byte-addressable main memory and a 64 KB, 4-way set associative cache memory with a block size of 256 bytes. Consider the following four physical addresses represented in hexadecimal notation.
A1 = 0x42C8A4, A2 = 0x546888, A3 = 0x6A289C, A4 = 0x5E4880
Which one of the following is TRUE?
Select one answerSingle correct
Pick an option to check
Solution
Step-by-step verified solution
Official answer: B) A2 and A3 are mapped to the same cache set.
Cache Memory and Hierarchy
### 1. Cache Geometry & Address Breakdown:
Main Memory Size=16 MB=224 bytes⟹ Physical Address is 24 bits.
Since it is 4-way set associative, the number of sets is:
Number of Sets=4256=64=26⟹Set Index=6 bits
Tag Bits=24−(6+8)=10 bits.
Address division (24 bits):
10 bitsTag6 bitsSet Index8 bitsBlock Offset
### 2. Extracting the Set Index for Each Address:
The lower 8 bits (the last 2 hex digits) correspond to the block offset.
The next 6 bits (bits 8 to 13) correspond to the set index, which is given by ((Address≫8)&0x3F):
A1 = 0x42C8A4:
Address≫8=0x42C8
Lowest byte is 0xC8=110010002
Lowest 6 bits =0010002=810
Set(A1)=8
A2 = 0x546888:
Address≫8=0x5468
Lowest byte is 0x68=011010002
Lowest 6 bits =1010002=4010
Set(A2)=40
A3 = 0x6A289C:
Address≫8=0x6A28
Lowest byte is 0x28=001010002
Lowest 6 bits =1010002=4010
Set(A3)=40
A4 = 0x5E4880:
Address≫8=0x5E48
Lowest byte is 0x48=010010002
Lowest 6 bits =0010002=810
Set(A4)=8
### 3. Evaluating the Options:
A: A1 and A4 are mapped to the same cache set (8). (False)
B: A2 and A3 are mapped to the same cache set (40). (True)
C: A3 (40) and A4 (8) are mapped to different cache sets. (False)
D: A1 (8) and A3 (40) are mapped to different cache sets. (False)
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Cache Memory and Hierarchy PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Cache Memory and Hierarchy in GATE CSE
Cache Memory and Hierarchy has 47 GATE CSE PYQs across 23 papers from 2011 to 2026. 16 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2020.
A plain-text card for WhatsApp or Telegram study groups.
GateAI solution cardGATE CSE 2020 · Q30 · MCQ
A computer system with a word length of 32 bits has a 16 MB byte-addressable main memory and a 64 KB, 4-way set associative cache memory with a block size of 256 bytes. Consider the following four physical addresses represented in hexadecimal notation. A1 = 0x42C8A4, A2 = 0x546888, A3 = 0x6A289C, A4 = 0x5E4880 Which one of the following is TRUE?