Comparator is used to compare tag bits generated by CPU with tag bits contained in tag directory. If there is a hit then the output is sent to cache lines where the buffer is enabled of that specific cache line and the output will be directed to a mux where a specific byte/word is selected from that line.