Skip to content
GATEiit

GATE CSE 2020 Q40: Which addresses map to the same set in a 4-way set-associative cache

Question

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?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2020 final answer key)

Concept used: Address = tag | set index | block offset; the set index bits decide the set.

First step: Sets =64 KB/(256×4)=64= 64\text{ KB}/(256 \times 4) = 64, so the offset is the low 8 bits and the set index is the next 6 bits.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2020 CS question paper and final answer key, organised by IIT Delhi. Question paper · Answer key