---
title: "Why direct mapping needs no replacement"
subject: "Computer Organization and Architecture"
chapter: 6
key: "semester_5/computer_organization_and_architecture:direct-no-replacement"
source: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/direct-no-replacement
site: BCT Engineering
---

# Why direct mapping needs no replacement

Computer Organization and Architecture · Chapter 6: Memory System

- Asked in: 2076 Asoj, 2 marks
- Video: [Direct Memory Mapping](https://www.youtube.com/watch?v=V_QS1HzJ8Bc) — Neso Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/direct-no-replacement
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_organization_and_architecture/chapter-6

## Question

Give reasons why a replacement algorithm is not required in the direct mapping technique.

## Short answer

In direct mapping each memory block maps to exactly one cache line (block mod number of lines). On a miss the incoming block must replace the block in that specific line; there is no choice among multiple lines, so no replacement algorithm is needed.

## Answer

In direct mapping each main-memory block can be placed in only one fixed cache line, given by line = block mod number of lines. When a miss occurs, the new block must go to that one line, and whatever block is there is simply overwritten. There is no choice between several candidate lines, so no replacement algorithm is needed to select a victim. The decision is already made by the mapping function itself.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What fixes the line in direct mapping?
   A. Random choice
   B. line = block mod number of lines
   C. LRU
   D. FIFO
   Answer: B. The mapping function decides. (Key point: Fixed line)

2. Why is no replacement algorithm needed?
   A. Cache is empty
   B. Only one candidate line, so no victim choice
   C. Blocks never conflict
   D. Memory is small
   Answer: B. The old block is simply overwritten. (Key point: No choice)

3. On a miss, what happens to the block in the target line?
   A. It is kept
   B. It is overwritten
   C. It is moved
   D. It is swapped
   Answer: B. There's no alternative line. (Key point: Overwrite)

## Close variants set in other exams

- [Associative mapping and replacement algorithms](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Aassociative-mapping) — Computer Organization and Architecture, chapter 6, asked 2×

## Related in Computer Organization and Architecture

- [Mapping function and replacement algorithm](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Amapping-replacement) — Computer Organization and Architecture, chapter 6
- [Replacement algorithm in associative mapping](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Areplacement-assoc) — Computer Organization and Architecture, chapter 6
- [Direct cache mapping](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Adirect-mapping) — Computer Organization and Architecture, chapter 6, asked 3×
- [Direct mapping with 32-block memory, 10 blocks used](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Adirect-mapping-example-10) — Computer Organization and Architecture, chapter 6, asked 3×
- [Direct mapping with 64-block memory, 10 blocks used](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Adirect-mapping-example-64) — Computer Organization and Architecture, chapter 6, asked 3×
- [Cache read and direct-mapping demerits](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Adirect-mapping-demerits) — Computer Organization and Architecture, chapter 6

## Related in other subjects

- [Reasons for replacement; strategy from AEC table](https://www.bctengineer.com/question.md?key=semester_6%2Fengineering_economics%3Areasons-replacement-aec-table-12) — Engineering Economics, chapter 5, asked 2×
- [Cache write policy and replacement algorithm](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Acache-write-policy-replacement) — Embedded System, chapter 4
- [Algorithm for numbers divisible by 9 not 6](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgo-flowchart-divisible-9-not-6) — Computer Programming, chapter 2
- [DC series motor should not start on no-load](https://www.bctengineer.com/question.md?key=semester_4%2Felectrical_machines%3Adc-series-motor-no-load-start) — Electrical Machines, chapter 4
