Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider a computer with a 4-ways set-associa... Start Learning for Free
Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.
While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line is
  • a)
    000011000
  • b)
    110001111
  • c)
    00011000
  • d)
    110010101
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Consider a computer with a 4-ways set-associative mapped cache of the ...
we have 16 sets in cache and correspondingly 16 regions in
physical memory to which each set is mapped. Now, WORD bit size is 7 as we need 7 bits to address 128 possible words in
a cache block. So, the lowest 7 bits of 0C795H will be used for this giving us the remaining bits as
0000 1100 0111 1
Of these bits, the lower 4 are used for addressing the 16 possible sets, giving us the tag bits: 0000 1100 0 in (A) choice.
This question is part of UPSC exam. View all Computer Science Engineering (CSE) courses
Most Upvoted Answer
Consider a computer with a 4-ways set-associative mapped cache of the ...
Cache Configuration Overview
- Total Main Memory: 1 MB (2^20 bytes)
- Word Size: 1 byte
- Block Size: 128 words (128 bytes)
- Cache Size: 8 KB (8192 bytes)
- Set-Associative Mapping: 4-way
Calculating Cache Parameters
- Number of Cache Blocks:
- Cache Size / Block Size = 8192 bytes / 128 bytes = 64 blocks
- Number of Sets:
- Total Cache Blocks / Associativity = 64 blocks / 4 ways = 16 sets
Address Breakdown
To determine the TAG field, we need to break down the address into parts: TAG, Index, and Offset.
- Memory Address: 0C795H (Hexadecimal) = 0C795 (Decimal) = 81205 (Decimal)
- Block Offset:
- Block Size = 128 bytes (log2(128) = 7 bits)
- Index Bits:
- Number of Sets = 16 (log2(16) = 4 bits)
- Total Bits for Address:
- Main Memory = 1 MB = 20 bits (since 2^20 = 1MB)
- TAG Field Bits:
- TAG = Total Bits - Index Bits - Offset Bits = 20 - 4 - 7 = 9 bits
Extracting TAG from the Address
1. Convert Address to Binary:
- 0C795H = 11001111001010101 (in binary)
2. Identify Offset:
- Last 7 bits for Offset: 0101010
3. Identify Index:
- Next 4 bits for Index: 0011
4. Identify TAG:
- Remaining bits: 110001111 (the first 9 bits)
Thus, the TAG field is 000011000 in binary, which corresponds to option 'a'.
Conclusion
The correct TAG field for the cache line accessing memory location 0C795H is indeed 000011000, validating option 'a' as the correct answer.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct answer is option 'A'. Can you explain this answer?
Question Description
Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct 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 computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct 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 computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct answer is option 'A'. Can you explain this answer?.
Solutions for Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct 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 computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct answer is option 'A'. Can you explain this answer?, a detailed solution for Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 1 MB of main memory, a word size of 1 byte, a block size of 128 words and a cache size of 8 KB.While accessing the memory location 0C795H by the CPU, the contents of the TAG field of the corresponding cache line isa)000011000b)110001111c)00011000d)110010101Correct 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