Related Articles
GATE | GATE 2017 MOCK II | Question 49
• Difficulty Level : Hard
• Last Updated : 31 Jan, 2017

A digital computer has a memory unit of 256k x 16 and a cache memory of 4k words. The cache uses direct mapping with a block size of 16 words.

How many bits are there in index, tag, block and words fields of address format ?

(A) 10, 6, 8, 2
(B) 12, 6, 8, 4
(C) 12, 8, 6, 4
(D) 10, 6, 8, 4

Explanation: Main Memory has 256k = 2^8 x 2^10 = 2^18.
i.e. We need 18 bits to address main memory.
Cache Memory has 4k = 2^2 x 2^10 = 2^12.
i.e. We need 12 bits to address cache memory.

Cache consists of Index and tag which together are used to address main memory location.
Here Index is 12 bits and tag is 6 bits. (18 – 12 = 6).

Index is divided into block part and word part. Block part is used to address blocks in cache and word part addresses individual word in a block.

Here a block size is 16 words. i.e. 2^4, we need 4 bits to address a word and 12 – 4 = 8 bits to address a block in cache memory.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :