coolbeanbob 17 Junior Poster

Homework Question:

For a direct-mapped cache design with 32-bit address, the following bits of the address are used to access the cache.

Tag: 31-10
Index: 9-4
Offset: 3-0

What is the cache line size (in words)?

Answer is:

The cache line size = 2^byte offset bits
= 2^4
= 16 bytes
Cache line size = 4 words

Now, I don't follow this answer at all.

"The cache line size = 2^byte offset bits" <- What does this mean?
I thought the offset was 4 "bits", not "bytes"

Then, if we have 16 bytes, how does that equal 4 words?
I thought 1 word = 2 bytes = 16 bits?
If this is true, 16 bytes would be 8 words!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.