36 36 votes Consider a direct mapped cache of size $32$ $KB$ with block size $32$ $bytes$. The $CPU$ generates $32$ $bit$ addresses. The number of bits needed for cache indexing and the number of tag bits are respectively, $10, 17$ $10, 22$ $15, 17$ $5, 17$ CO & Architecture gatecse-2005 co-and-architecture cache-memory easy + – Kathleen 22.3k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply MrBananaMan commented Sep 24, 2024 reply Follow flag Does this question assumes memory is byte addressable? 0 0 replyShare Arnav Singh_01 commented Oct 2, 2024 reply Follow flag Memory is by default byte addressable if it is word addressable then it will be mentioned explicitly in the question 2 2 replyShare Raj_Dev_Verma commented Aug 1 reply Follow flag 10, 17 Option A is correct 0 0 replyShare Please log in or register to add a comment.
Best answer 48 48 votes Number of blocks $= \dfrac{\text{cache size}}{\text{block size}}= \dfrac{32\text{ KB}}{32 \text{ B} }=\text{1024}$So, indexing requires $\text{10-bits}.$ Number of OFFSET bits required to access $\text{32-bit block} = 5.$So, number of TAG bits $= 32 - 10 - 5 = 17.$So, answer is (A). Arjun answered Nov 7, 2014 • edited Dec 25, 2024 by Arjun Arjun comment Share Follow See all 9 Comments 9 9 Comments reply Show 6 previous comments rajoramanoj commented Jan 26, 2019 reply Follow flag why not c ....???? 0 0 replyShare KartikGawande commented Oct 20, 2022 reply Follow flag guys cache indexing means ‘ability to point out a line in cache’ no of lines in cache are 1024 hence we only need 10 bits in it not 15 (ie we dont include word offset) 3 3 replyShare Nalinj commented Apr 1, 2024 reply Follow flag its in bytes right? so we should add 8 bits more right? 1 1 replyShare Please log in or register to add a comment.
7 7 votes In Direct mapped cache: Address format= Tag + cache index + Offset Offset = log(block size) = log(32B) = log(2^5) =5 bits index = log(cache size / block size) = log(32KB)/log(32B) = 10 bits Finally Tag = Total bits - index - offset = 32 - 10 - 5 = 17 bits NOTE: Base of log is 2 Suneel Padala answered Aug 23, 2018 Suneel Padala comment Share Follow 0 reply Please log in or register to add a comment.
2 2 votes .......……….............………..........…….…………….. Mohitdas answered Nov 12, 2021 Mohitdas comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Answer and Its Formula nirmal_aravind answered Oct 20, 2024 nirmal_aravind comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Block size is of 32 bytes which means we require 5 bits to store byte offset value. 32-5=27 bits require for cache indexing + number of tag bits.We can see only option A (10+17) staify the above condition. Shivadu answered Dec 15, 2024 Shivadu comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes In any type of Cache the physical address or Memory address is divided into 2 parts 1. Block Number 2. Block Offset Given that Memory address is 32 bits and block size is 32Bytes So No.of bits for Block Offset = logbase2(32) = 5bits Now we got Block Offset bits , then subtract the bits from 32 bits Remaining bits = 32 - 5 = 27 From the options verify which sum is giving the value 27, that will be the answer So Option A : 10 + 17 = 27 => Correct Option B: 10 + 22 = 32 incorrect option C: 15 + 17 = 32 incorrect option D : 5 + 17 = 22 incorrect Therefore Option A is Correct Correct me if i'm wrong Karthik_Voorukonda answered Jul 17 Karthik_Voorukonda comment Share Follow 0 reply Please log in or register to add a comment.