2 votes 2 votes Consider a 256KB direct mapped byte addressable cache. If one word is 4 bytes and each cache block contains 16 words , then determine the number of bits required for tag.(Assume that physical address of computer is 32 bits) mystylecse asked Aug 15, 2017 mystylecse 3.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 1 votes 1 votes Each cache block contain 16 words each word is 4 byte so addressable memory is 16*4= 64 bytes Number of blocks 256KB/16*4=$\frac{2^{18}}{2^{6}}$=$2^{12}$ Address is divided as Tag|Block|Byte Block = 12 bits Word= 6 bits Tag=32-12-6 =14 bits Unless not mentioned system is byte addressable Eg https://gateoverflow.in/1963/gate2014-2-9 Tesla! answered Aug 15, 2017 • selected Aug 15, 2017 by mystylecse Tesla! comment Share Follow See all 18 Comments See all 18 18 Comments reply joshi_nitish commented Aug 15, 2017 reply Follow Share @Tesla! answer will be 14 bits only the computer is byte addressable only, if nothing is given.. one word= 4 bytes means that in one memory cycle data bus can carry 4 bytes.. 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share But it is given 1 block contain 16 words thus word addressable 0 votes 0 votes joshi_nitish commented Aug 15, 2017 reply Follow Share if i reframe qsn like this, what will be your answer? "Consider a 256KB direct mapped byte addressable cache. If one word is 4 bytes and each cache block contains 64 bytes , then determine the number of bits required for tag.(Assume that physical address of computer is 32 bits)" 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share Then system is byte addressable, Byte=6 bits Block= 12 Tag=32-12-6=14 bits 0 votes 0 votes joshi_nitish commented Aug 15, 2017 reply Follow Share @Tesla! see this, https://gateoverflow.in/131015/computer-architecture-2-7 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share Page not found errors 0 votes 0 votes joshi_nitish commented Aug 15, 2017 reply Follow Share in recent activity where you have answered about "minimum comparison required", just below it is that qsn whose link i had send you. 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share Below that is hamming code question, if possible post question here in comment 0 votes 0 votes just_bhavana commented Aug 15, 2017 reply Follow Share By default, memory is byte addressable. So here block size is 16*4 = 64 B 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share Then why they have given 1 word = 4 byte and block has 16 words ? 0 votes 0 votes just_bhavana commented Aug 15, 2017 reply Follow Share Because cache block is given in terms of number words.. also they've given cache is byte addressable. So to convert words to bytes, we need word size. 0 votes 0 votes joshi_nitish commented Aug 15, 2017 reply Follow Share @just_bhavna @Tesla! word means number of bytes that data bus can carry at one time(one memory cylce), here nothing to do with word size, if nothing is given it should be taken as byte addresable memory 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share https://gateoverflow.in/3403/gate2008-it-80 refer this 0 votes 0 votes joshi_nitish commented Aug 15, 2017 reply Follow Share @Tesla! there it would be no problem since 1 word = 1 byte, you take any other qsn where 1word != 1 byte, then you will see you will get wrong answer with your concept.. 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share Please share your reference 0 votes 0 votes just_bhavana commented Aug 15, 2017 reply Follow Share Have a look @Tesla! https://gateoverflow.in/88124/ace-test-co-i 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share How is related to this question just_bhavan they are asking total size and check source 0 votes 0 votes Tesla! commented Aug 15, 2017 reply Follow Share Yes you all were correct unless until mentioned system is byte addressable, problem was book I refer ( hamacher) usually use word addressable systems, sorry for wasting your time 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes logical address generated by the cpu is to find a block of main memory for accessing 1 byte of data (in case of byte addressable system) no of blocks in main memory=32-6=26bits=226 blocks no of blocks in cache =18-6=12bits =212 blocks now required tag bits =26-12=14bits..... out of 32bits ....14bits (tag bit) 12bits(block no) ,6bits(word)......bocz cpu is accessing a byte not word https://en.wikipedia.org/wiki/Byte_addressing hs_yadav answered Aug 15, 2017 hs_yadav comment Share Follow See all 0 reply Please log in or register to add a comment.