Fig. 6 shows how a two-way set-associative cache, in which there are two possible locations in the cache for an address, handles a memory request. Like a direct-mapped cache, subsets of the address bits are used to select the set that might contain the address. Because the cache is two-way set-associative, there are two tags that must be compared to the address of the memory reference to determine if a hit has occurred. If either of the tags matches the address, a hit has occurred and the corresponding line from the data array is selected. Caches with higher associativity have similar structures, with more comparators to determine if a hit has occurred.