Since word length is given, it is best that we convert everything to words.
Physical Address Space is $2^P$ bytes.
Word Size is $2^W$ words.
$\therefore$ Total bits for addressing $\rightarrow$ $2^{P-W}$ words.
Cache Size is $2^N$ bytes $\Rightarrow$ $2^{N-W}$ words.
Block Size is $2^M$ words.
# of sets = $\frac{2^{N-W}}{2^M*2^{logK}} = 2^{N-W-M-logK}$
Now we have
TAG($x$) |
Set($N-W-M-logK$) |
Word Offset($M$) |
$\therefore x + N - W - M -logK + M = P - W$
$\therefore x = P - N + logK$
Option (B)