Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider a direct mapped cache of size 32 KB ... Start Learning for Free
Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,
  • a)
    10, 17
  • b)
    10, 22
  • c)
    15, 17
  • d)
    5, 17
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Consider a direct mapped cache of size 32 KB with block size 32 bytes....
Number of blocks = cache size/block size = 32KB/32 = 1024 bytes. So, indexing requires 10 bits. Number of OFFSET bits required to access 32 bit block = 5. So, number of TAG bits = 32 - 10 - 5 = 17. So, answer is (A).
View all questions of this test
Most Upvoted Answer
Consider a direct mapped cache of size 32 KB with block size 32 bytes....
Solution:

Given, Cache size = 32 KB = 2^15 bytes
Block size = 32 bytes = 2^5 bytes
Total number of blocks = Cache size / Block size = 2^15 / 2^5 = 2^10

Index bits:
As it is a direct-mapped cache, the index bits can be calculated using the formula:
Index bits = log2(Number of blocks) = log2(2^10) = 10 bits

Tag bits:
Since the CPU generates 32-bit addresses, and the cache is 32 KB, the remaining bits after the index bits can be used for the tag bits.
Total address bits = 32 bits
Index bits = 10 bits
Block offset bits = log2(Block size) = log2(32) = 5 bits
Tag bits = Total address bits - Index bits - Block offset bits = 32 - 10 - 5 = 17 bits

Therefore, the number of bits needed for cache indexing is 10, and the number of tag bits is 17. Hence, option (a) is the correct answer.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer?
Question Description
Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer?.
Solutions for Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer?, a detailed solution for Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number ofbits needed for cache indexing and the number of tag bits are respectively,a)10, 17b)10, 22c)15, 17d)5, 17Correct answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev