Similar questions 15 more →
Cache Memory

Answer & solution
Official answer: B
Method
A byte address has P bits. First convert block capacity from words to bytes, obtaining 2M+W. Cache blocks total 2N−M−W; grouping K per set divides this by K. Address bits split into tag, set index and byte-within-block offset. Increasing associativity at fixed capacity reduces index bits and therefore increases tag bits, a useful sign check on the log₂K term. The result assumes integral power-of-two field sizes.
Solution
A block contains 2M+W bytes. There are 2N−M−W/K sets, so index bits=N−M−W−log2K, and block-offset bits=M+W. Subtract both from P address bits: tag=P−N+log2K, B, under the conventional power-of-two cache parameters.