Computer Science, asked by Manasmsd3317, 11 months ago

A digita computer has a menory unit of 64kx16 and a cache memory of 1k words. A cache uses direct mapping with a block size of four words. How many bits are there in the tag, index and block fields of address format?

Answers

Answered by drushtidspaceo
0

Main memory has 64K = 64 x 1024 = 2^6 x 2^10 = 2^16 words

Cache memory has 1K = 1024 = 2^10 words


Cached address consists of Index and Tag part. Index and Tag together make main memory address. Index part addresses cache memory and Tag part represents the rest of the main memory address.

In this case to address main memory we need 16 bits (2^16) and to address cache memory we need 10 bits (2^10).

So Index is 10 bits wide and Tag is 6 bits wide (16 - 10 = 6).


When using blocks the the Index is divided into the "Block" part and the "Word" part. Block part addresses blocks of cache memory and Word part addresses individual words in a block.

In this case the block is 4 words long for what we need 2 bits (2^2) and that leaves 8 bits (10 - 2 = 8) for addressing blocks.


Summary:

Tag = 6 bits

Index = 10 bits

Block = 8 bits

Word = 2 bits

Similar questions