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?
A1 and A4 are mapped to different cache sets.
A2 and A3 are mapped to the same cache set.
A3 and A4 are mapped to the same cache set.
A1 and A3 are mapped to the same cache set.
16 MB byte addressable main memory requires 24 bits.
64 KB - 4-way set associative cache is given. Block size 256 bytes so, block offset requires 8 bits.
Total number of sets =
TAG bits = 24 – 6 – 8 = 10 bits.
Set bits = 6, block bits = 8
Memory Address:
Since we need to check whether the options belong to the same set or not.
∴ A1 = 0 × 42 C8A4 Since we know the tag is of 10 bits ∴ leave 10 bits from LHS and check the next 6 bits of each no.