A direct-mapped cache of 64 KB with 64-byte blocks is used with 32-bit byte addresses. How are the address bits split into tag, index and offset?

Correct answer C. Tag 16, index 10, offset 6

Explanation

A 64-byte block needs log2(64) = 6 offset bits. The cache holds 64 KB / 64 B = 1024 lines, so the index needs 10 bits. The tag is what remains: 32 - 10 - 6 = 16 bits. Swapping index and tag, or confusing the number of lines with the block size, are the usual errors. In a direct-mapped cache the number of sets equals the number of lines.

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.