1

enter image description here

Given info: 14 bits for tag, 8 bits for set, 2 bits for word ID. Enter the value that was retrieved from the memory address 396BBA9. I'm confused on this question because the memory address has 28 bits, while the tag set and word ID are only 21 bits. What do I do with the extra bits? Also, how can I determine the specific byte in the word?

I know that the answer is 45, this is not a homework question, I am just trying to figure out how to approach this.

1 Answer 1

2

Binary of 396BBA9 -> 11100101101011101110101001 which translates to 26 bits. Now we have 14 bits for tags, 8 bits for set index and 2 bits for word id, that makes it total of 24 bits. Now this cache is byte addressable, so we need 2 more bits to access a byte within a word.

Break up of address 396BBA9 would be then - Tag(11100101101011) Set(10111010 or 186) Word(10) Byte(01). So now go to set index 186, match the tag , go to word 10 and the access the byte 01 which is 45.

Hope it explains.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.