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 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, are
  • a)
    11, 5 and 6
  • b)
    9, 7 and 6
  • c)
    9, 6 and 7
  • d)
    11, 4 and 7 
Correct answer is option 'D'. Can you explain this answer?
Most Upvoted Answer
Consider a 4-way set-associative cache consisting of 64 lines, with a ...
Given:
- 4-way set-associative cache
- 64 lines in the cache
- Line size of 128 words
- CPU generates a 22-bit address

To find:
The number of bits in the TAG, LINE, and WORD fields

Solution:

1. Finding the number of bits for the LINE field:
Since the cache is 4-way set-associative, each set will have 4 lines. Therefore, the number of sets in the cache will be 64/4 = 16. The LINE field is used to select a set, so it needs to have enough bits to represent all the sets. Since there are 16 sets, the LINE field requires log2(16) = 4 bits.

2. Finding the number of bits for the WORD field:
The word size is given as 128 words. To represent 128 words, we need log2(128) = 7 bits.

3. Finding the number of bits for the TAG field:
The remaining bits after the LINE and WORD fields will be used for the TAG field. The total number of bits in the address is 22, and we have already accounted for 4 bits for the LINE field and 7 bits for the WORD field. Therefore, the number of bits for the TAG field will be 22 - 4 - 7 = 11 bits.

Therefore, the number of bits in the TAG, LINE, and WORD fields are 11, 4, and 7, respectively. Hence, the correct option is D.
Free Test
Community Answer
Consider a 4-way set-associative cache consisting of 64 lines, with a ...
Each line has 128 = 27 words
∴ WORD = 7 bits
No. of sets = 64/4 = 16 = 24
∴ LINE = 4 bits
∴ TAG = 22 – (7 + 4) = 11
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Consider a 4-way set-associative cache consisting of 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct answer is option 'D'. Can you explain this answer?
Question Description
Consider a 4-way set-associative cache consisting of 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct 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 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct 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 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct answer is option 'D'. Can you explain this answer?.
Solutions for Consider a 4-way set-associative cache consisting of 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct 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 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct 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 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct answer is option 'D'. Can you explain this answer?, a detailed solution for Consider a 4-way set-associative cache consisting of 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct answer is option 'D'. Can you explain this answer? has been provided alongside types of Consider a 4-way set-associative cache consisting of 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct 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 64 lines, with a line size of 128 words. The CPU generates 22-bit address of a word in the main memory. The number of bits in the TAG, LINE and WORD fields (in bits), respectively, area)11, 5 and 6b)9, 7 and 6c)9, 6 and 7d)11, 4 and 7Correct 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