A two way set associative cache memory unit with a capacity of 16 KB is built…

2017

A two way set associative cache memory unit with a capacity of 16 KB is built using a block size of 8 words. The word length is 32 bits. The physical address space is 4 GB. The number of bits in the TAG, SET fields are

  1. A.

    20, 7

  2. B.

    19, 8

  3. C.

    20, 8

  4. D.

    21, 9

Attempted by 69 students.

Show answer & explanation

Correct answer: B

1. Word length = 32 bits = 4 bytes. Block size = 8 words * 4 bytes/word = 32 bytes.

2. Block offset bits = log2(32) = 5 bits. Cache capacity = 16 KB = 2^14 bytes.

3. Number of blocks = 2^14 / 32 = 2^9. Number of sets (2-way) = 2^9 / 2 = 2^8. Set index bits = log2(256) = 8 bits.

4. Physical address = 4 GB = 2^32 bytes (32 bits). Tag bits = 32 - 8 - 5 = 19 bits. Final Answer: TAG = 19 bits, SET = 8 bits.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro