Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A block-set associative cache memory consists... Start Learning for Free
A block-set associative cache memory consists of 128 blocks divided into four block sets. The main memory consists of 16,384 blocks and each block contains 256 eight bit words.



  1. How many bits are required for addressing the main memory?

  2. How many bits are needed to represent the TAG, SET and WORD fields?


Correct answer is '9'. Can you explain this answer?
Verified Answer
A block-set associative cache memory consists of128blocks divided into...
View all questions of this test
Most Upvoted Answer
A block-set associative cache memory consists of128blocks divided into...
Solution:

1. Addressing the main memory:
Since the main memory contains blocks, and each block contains 8 bit words, we need to find the total number of blocks in the main memory.

Let the total number of blocks in the main memory be 'N'.
Since the block-set associative cache memory consists of blocks divided into four block sets, there are N/4 blocks per set.
Since there are four block sets, the total number of sets in the cache is N/4 * 4 = N.

Let the number of bits required to address the main memory be 'b'.
Each block contains 8 bit words, so the address of each word within a block can be represented using 3 bits (since 2^3 = 8).
Therefore, each block can be addressed using log2(8) = 3 bits.
Since there are N blocks in the main memory, we need log2(N) bits to address the main memory.

Thus, we have b = log2(N) + 3.

Substituting N = 2^16 (since each block is 16 bits long), we get:
b = log2(2^16) + 3
b = 16 + 3
b = 19 bits.

However, we need to calculate the number of bits required to address the main memory in the block-set associative cache memory, which is divided into four block sets.
Therefore, we need to find the number of bits required to address each set in the cache, which is given by:
log2(N/4) + 3 = log2(2^14) + 3 = 14 + 3 = 17 bits.

Therefore, the total number of bits required to address the main memory in the block-set associative cache memory is:
b = log2(N) - log2(4) + log2(4) + 3 = log2(N/4) + 2 + 17 = 22 bits.

2. Representing the TAG, SET, and WORD fields:
Since the cache memory is block-set associative, each block in the main memory maps to one of the four sets in the cache.
Let the number of bits required to represent the TAG, SET, and WORD fields be 't', 's', and 'w', respectively.

Since there are four sets in the cache, we need log2(4) = 2 bits to represent the SET field.
Since each block is 16 bits long, we need log2(16) = 4 bits to represent the WORD field.

To calculate the number of bits required to represent the TAG field, we can subtract the number of bits used to represent the SET and WORD fields from the total number of bits required to address the main memory, which is 22 bits.
Therefore, we have:
t = 22 - s - w
t = 22 - 2 - 4
t = 16 bits.

Thus, the number of bits required to represent the TAG, SET, and WORD fields are:
TAG = 16 bits.
SET = 2 bits.
WORD = 4 bits.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer?
Question Description
A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 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 A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer?.
Solutions for A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. 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 A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer?, a detailed solution for A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer? has been provided alongside types of A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A block-set associative cache memory consists of128blocks divided into four block sets. The main memory consists of16,384blocks and each block contains256eight bit words. How many bits are required for addressing the main memory? How many bits are needed to represent the TAG, SET and WORD fields?Correct answer is '9'. 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