Two-way cache hit latency
Cache Memory


Answer & solution
Answer: A (no official key was published)
Step 1: 32 KB / 32 B=1024 cache lines. Two ways give 512 sets, so index=9 bits and block offset=5 bits.
Step 2: The tag is 32−9−5=18 bits. Two tag comparisons proceed in parallel, taking 18/10=1.8 ns; selecting the matching way adds 0.6 ns.
Step 3: Thus h1=2.4 ns, A, within the stated model that counts comparator and multiplexer latency.
Step 4: Teaching check: Two-way associativity halves the number of sets relative to direct mapping, increasing the tag by one bit. Both way tags are compared in parallel, so do not double comparator latency. The selected data then passes through one 2:1 multiplexer.

