00:01
Hello student, here the first question is how many blocks of the main memory are there? so here it is given the cache has 2 raised to power 20 bytes of the byte addressable main memory and a cache of 32 blocks.
00:14
So here the number of the blocks of the main memory is calculated by the formula number of the blocks of the main memory is equal to total memory size divided by the block size number of blocks of the main memory.
00:27
So here 2 raised to power 20 it is given to us and here 2 raised to power 4 block size is here given.
00:38
So block size here is 2 raised to power 4 which is equal to 16.
00:45
So this is given to us and here memory total memory size is also given.
00:51
Total memory size which is equal to 2 raised to power 20.
00:59
This is also given to us.
01:01
So put these value and after putting these value we get 2 raised to power 16.
01:07
So here 2 raised to power 16 if we open if we calculate this its value come 65536 and these blocks are there in the main memory.
01:18
So 2 raised to power 16 or 65536 these are the blocks of the main memory.
01:27
Number two question here is in a direct mapped cache the format of the memory address.
01:37
So here in a direct mapped cache the format of the memory address consists of the three part.
01:46
The three parts are tag, block and offset.
01:49
So three part are tag plus block plus offset.
01:57
So this is the direct mapped cache consists of these three part.
02:02
So total block of the main memory this is given to so this is we have calculated 2 raised to power 16 blocks since each block in the cache maps to the one block in the main memory.
02:12
So here cache has 32 blocks.
02:15
So it has 2 raised to power 5 blocks.
02:18
So here cache has 2 raised to power 5 blocks.
02:22
So now we need to find the size of the tag, block and offset field.
02:27
So here block size is 16 bytes.
02:29
So which can be represented by using 2 raised to power 4 bits.
02:34
So 2 raised to power 4 equal to 16 number of the blocks in the cache is equal to 2 raised to power 5 block which can be represented using 5 bits.
02:42
So 2 raised to power 5 32.
02:44
The remaining bits in the address are used for the tag field.
02:49
So the format of the main memory is as follows...