Consider a machine with a byte addressable main memory of 216 bytes and block size of 8 bytes. Assume that a direct mapped cache consisting of 32 lines used with this machine. How many bits will be there in Tag. line and word field of format of main memory addresses ?

This question was previously asked in
UGC NET Computer Science (Paper 2) 2020 Official Paper
View all UGC NET Papers >
  1. 8, 5, 3
  2. 8, 6, 2
  3. 7, 5, 4
  4. 7, 6, 3

Answer (Detailed Solution Below)

Option 1 : 8, 5, 3
Free
UGC NET Paper 1: Held on 21st August 2024 Shift 1
13 K Users
50 Questions 100 Marks 60 Mins

Detailed Solution

Download Solution PDF

The correct answer is option 1.

 Key Points

Direct Mapping: 

Given Data,

Main memory size =216 bytes

No of blocks in Main memory (M)=216  ÷ 23

Block Size (P)= 23 bytes

No of blocks in the cache memory (N) =25 bytes 

Tag=28=Tag bits= log2(M/N)

line or cache block= 2=cache block  bits= log2N

word field or word offset= 23=word offset bits=log2P

∴ Hence the correct answer is (8,5,3).

Important Points

N = No of blocks in cache memory  =(cache memory size)/Block size

M=  No of blocks in main memory   = (main memory size)/Block size

P=Block size

Latest UGC NET Updates

Last updated on Jun 12, 2025

-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.

-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.

-> The exam is conducted bi-annually - in June and December cycles.

-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions. 

-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.

More Direct Mapping Questions

Get Free Access Now
Hot Links: teen patti star teen patti master teen patti win rummy teen patti teen patti master downloadable content