Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider a 4-way set associative cache consis... Start Learning for Free
Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:
  • a)
    9, 6, 5
  • b)
    7, 7, 6
  • c)
    7, 5, 8
  • d)
    9, 5, 6
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
Consider a 4-way set associative cache consisting of 128 lines with a ...
Number of sets = cache size/(size of a block * No. of blocks in a set)
= 128 * 64 / (64 * 4) (4 way set associative means 4 blocks in a set)
= 32.
So, number of index (LINE) bits = 5 and number of WORD bits = 6 size cache block (line) size is 64. So, number of TAG
bits = 20 - 6 - 5 = 9.
Answer is (D) choice
This question is part of UPSC exam. View all Computer Science Engineering (CSE) courses
Most Upvoted Answer
Consider a 4-way set associative cache consisting of 128 lines with a ...
Calculation of TAG, LINE, and WORD fields
- Given parameters: 4-way set associative cache, 128 lines, line size of 64 words
- Total number of lines in the cache = 128
- Number of sets = Total lines / Associativity = 128 / 4 = 32
- Number of blocks in each set = 4 (4-way set associative)
- Number of words in each block = 64

CALCULATION OF TAG BITS
- Total number of bits in the address = 20 bits
- Number of bits for the offset (WORD field) = log2(64) = 6 bits
- Number of bits for the index (LINE field) = log2(32) = 5 bits
- Number of bits for the tag = Total bits - (Offset bits + Index bits) = 20 - (6 + 5) = 9 bits

FINAL ANSWER
- Therefore, the number of bits in the TAG, LINE, and WORD fields are 9, 5, and 6 respectively, which matches option 'D'.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. Can you explain this answer?
Question Description
Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. 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 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. 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 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. Can you explain this answer?.
Solutions for Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. 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 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. Can you explain this answer?, a detailed solution for Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. Can you explain this answer? has been provided alongside types of Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bitaddress of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:a)9, 6, 5b)7, 7, 6c)7, 5, 8d)9, 5, 6Correct answer is option 'D'. 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