Z
zelnaga
i'm trying to understand how caches work and am a little confussed.
a 16-bit address with a 4-kilobit page has a maximum index of 2^4 and a
total of 4096 offsets. 4096 is equal to 2^(16-4).
but what about a 32-bit address with an eight kilobit page? the
maximum index is 2^8, and there are a total of 8192 offsets, but 8192
doesn't equal 2^(32-8). doesn't it need to?
i ask because i was under the impression that the bits not used to
index were used to represent the offset. yet if the pages are 8
kilobits, then they only need 13 bits - not the 24 bits that 32-8 would
yield...
a 16-bit address with a 4-kilobit page has a maximum index of 2^4 and a
total of 4096 offsets. 4096 is equal to 2^(16-4).
but what about a 32-bit address with an eight kilobit page? the
maximum index is 2^8, and there are a total of 8192 offsets, but 8192
doesn't equal 2^(32-8). doesn't it need to?
i ask because i was under the impression that the bits not used to
index were used to represent the offset. yet if the pages are 8
kilobits, then they only need 13 bits - not the 24 bits that 32-8 would
yield...