29 votes 29 votes Consider a machine with a byte addressable main memory of $2^{32}$ bytes divided into blocks of size $32$ bytes. Assume that a direct mapped cache having $512$ cache lines is used with this machine. The size of the tag field in bits is _______ CO and Architecture gatecse-2017-set2 co-and-architecture cache-memory numerical-answers + – Madhav asked Feb 14, 2017 edited Jun 19, 2021 by Lakshman Bhaiya Madhav 9.4k views answer comment Share Follow See 1 comment See all 1 1 comment reply Hira Thakur commented Jan 2 reply Follow Share A similar type of question is asked in GATE CSE 2021 Set 1 | Question: 22 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes In Direct Mapped Cache Tag bits = log(Main Memory size/ cache size) Cache size = No of blocks * Block size = 512*32 = 2^14 Tag bits = log(2^32/2^14) = log(2^18) = 18 bits Suneel Padala answered Feb 8, 2019 Suneel Padala comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Answer is 18 bit In the case of direct mapping Tag field is the ratio of main memory and cache memory. Rajesh Panwar answered Nov 27, 2018 Rajesh Panwar comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes tag bits are Log of (Main memory size) divided by (cache size) in case of direct mapped cache.. So , log of $(2^{32})\div(512*32)$ is 18 ans. Punit Sharma answered Dec 16, 2019 Punit Sharma comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Given that it is a byte addressable memory and the main memory is of size 2^32 Bytes. So the physical address is 32 bits long. Each block is of size 32(=2^5) Bytes. So block offset 5. Also given that there are 512(=2^9) cache lines, since it is a direct mapped cache we need 9 bits for the LINE number. When it is directed mapped cache, the physical address can be divided as (Tag bits + bits for block/LINE number + bits for block offset) So, tag bits + 9 + 5 = 32 Tag bits = 32 - 14 = 18 topper98 answered Mar 24, 2020 topper98 comment Share Follow See 1 comment See all 1 1 comment reply Arjun commented Mar 24, 2020 reply Follow Share Why are you answering already answered questions? An answer does not make sense if it is not adding anything new to the already given ones. 0 votes 0 votes Please log in or register to add a comment.