A 4-way set-associative cache holds 32 KB with 32-byte blocks and 32-bit addresses. How many tag bits does each block need?

Correct answer B. 19

Explanation

Offset = log2(32) = 5 bits. Number of sets = 32 KB / (32 B x 4 ways) = 256, so the index takes 8 bits. Tag = 32 - 8 - 5 = 19 bits. Answering 17 treats the cache as direct-mapped (1024 sets, 10 index bits). Each doubling of associativity halves the sets, removing one index bit and adding one tag bit.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.