retagged by
613 views
2 votes
2 votes

 

retagged by

2 Answers

4 votes
4 votes

22 should be correct answer as we know CPU will generate the address which is divided as 

     

TAG BITS                                    SET OFFSET                        WORD OFFSET

Now CPU generate the address of 34 bits ..now one word is of 64 bits ...we have one BLOCK of 1KB so number of words present in one block are = (1024*8 ) / 64 = 128 Words ....so if 128 words are there in ONE BLOCK to identify each one of them we need 7 bits SO WORD OFFSET = 7 bits .  Now number of lines in cache = cache size / Block size = 256  Kb / 1KB = 256 Lines 

So as per problem one set has 8 lines so x set will have 256 lines ...so number of set are = 256/8 = 32 sets 

So to identify each one of them we need 5 bits ...so SET OFFSET is 5 bits 

SO TAG bits = 34 - (5+7)= 34 - 12 = 22 bits .. 

Related questions

3 votes
3 votes
1 answer
2
Shubhanshu asked Aug 5, 2017
1,020 views
Draw the diagram which shows the mechanism of fetching the data in 2-way set associative mapping using multiplexer, comparator, and encoder?
0 votes
0 votes
1 answer
4
focus _GATE asked Jun 5, 2015
6,424 views
16 KB, 4-way set-associative cache, 32-bit address, byte addressable memory, 32-byte cache blocks/linesHow many tag bits?Where would you find the word at address 0x200356...