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 Show 15 previous comments 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.