For a direct-mapped cache, 4 bits are used for the tag field and 12 bits are used to index into a cache block. The size of each cache block is one byte. Assume that there is no other information stored for each cache block. Which ONE of the following is the CORRECT option for the sizes of the main memory and the cache memory in this system (byte addressable), respectively?
Solution :
The correct option is 64 KB and 4 KB.
Let us understand the step-by-step breakdown of how to find the sizes of the main memory and the cache memory in this system.
1. Understanding the Address Format
In a direct-mapped cache, a main memory address is typically divided into three fields:
• Tag field
• Index (or Line/Block offset) field
• Block offset (or Byte offset) field
First, let's look at the given parameters:
• Tag field bits = 4 bits
• Index field bits = 12 bits
• Block size = 1 byte
Since the cache block size is 1 byte, and the system is byte-addressable, we only need 0 bits to identify a byte within a cache block because 20 = 1. Therefore, the block offset field is 0 bits.
2. Determining Main Memory Size
The total number of address bits required for the main memory is the sum of the bits in the tag, index, and block offset fields:
With 16 bits of address space, the total number of addressable locations in the main memory is:
Since 210 bytes = 1 KB:
Thus, the main memory size is 64 KB.
3. Determining Cache Memory Size
The number of cache lines (or cache blocks) is determined by the number of index bits:
The cache memory size (data capacity) is the product of the number of cache blocks and the size of each block:
Converting this to kilobytes:
Thus, the cache memory size is 4 KB.
Conclusion
The main memory size is 64 KB and the cache memory size is 4 KB.
Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.
Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.
Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.
Prepare for GATE 2026 Civil Engineering with the latest question papers, previous year papers, detailed solutions, syllabus, exam pattern, preparation tips, mock tests, and subject-wise study material. Download GATE 2026 CE question papers with solutions in PDF format and boost your preparation for top engineering institutes and PSU recruitment.
Prepare effectively for GATE 2026 Electronics & Communication Engineering (EC) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Electronic Devices, Analog Circuits, Digital Circuits, Signals & Systems, Network Theory, Control Systems, Electromagnetics, Communications, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 EC preparation strategy.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.