Consider a machine with a byte addressable main memory of 216 bytes block size…

2020

Consider a machine with a byte addressable main memory of 216 bytes block size of 8 bytes. Assume that a direct mapped cache consisting of 32 lines used with this machine. How many bits will be there in Tag, line and word field of format of main memory addresses?

Answer: A. 8,5,3Solution: Total main memory size = 2^16 bytes, so address length = 16 bits. Block size = 8 bytes, so block offset (word) = log2(8) = 3 bits. Cache has 32…

  1. A.

    8,5,3

  2. B.

    8,6,2

  3. C.

    7,5,4

  4. D.

    7,6,3

Attempted by 386 students.

Show answer & explanation

Correct answer: A

Solution:

  • Total main memory size = 2^16 bytes, so address length = 16 bits.

  • Block size = 8 bytes, so block offset (word) = log2(8) = 3 bits.

  • Cache has 32 lines, so index (line) = log2(32) = 5 bits.

  • Tag bits = total address bits - index bits - offset bits = 16 - 5 - 3 = 8 bits.

Therefore the fields (Tag, line, word) are 8, 5, 3.

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

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…