---
title: "Short note: I/O mapped and memory mapped I/O"
subject: "Microprocessor"
chapter: 4
key: "semester_4/microprocessor:io-mapped-memory-mapped-io"
source: https://www.bctengineer.com/q/semester_4/microprocessor/io-mapped-memory-mapped-io
site: BCT Engineering
---

# Short note: I/O mapped and memory mapped I/O

Microprocessor · Chapter 4: Microprocessor System

- Asked in: 2071 Magh, 4 marks
- Video: [Memory Mapped IO vs IO Mapped IO in 8085 Microprocessor: Key Differences Explained](https://www.youtube.com/watch?v=iDzdyRCdqnA) — Engineering Funda
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/microprocessor/io-mapped-memory-mapped-io
- Whole chapter: https://www.bctengineer.com/md/semester_4/microprocessor/chapter-4

## Question

Write a short note on I/O mapped and memory mapped I/O.

## Short answer

I/O mapped I/O uses a separate address space with IN/OUT instructions and IOR/IOW signals, typically 256 ports. Memory mapped I/O treats devices as memory locations, using all memory instructions and MEMR/MEMW signals, but reduces memory space and needs more decoding.

## Answer

There are two ways to assign addresses to I/O devices.

**I/O mapped I/O (isolated I/O):** I/O devices have a separate address space. The processor uses special instructions IN and OUT and the control signal IO/M = 1 (8085) or M/IO = 0 (8086). 8085/8086 give 8-bit port addresses (256 ports; 8086 can also use DX for 64K ports). Data transfer is only through the accumulator. Example: `OUT 80H`.

**Memory mapped I/O:** an I/O device is treated as a memory location; the device gets an address in the normal memory map, and all memory instructions (MOV, LDA, STA, ADD, etc.) can be used. The control signals are MEMR/MEMW, and the 16-bit address is fully decoded. Example: `STA 8000H` writes to a port at 8000H.

| Point | I/O mapped | Memory mapped |
|---|---|---|
| Address space | Separate (256 ports in 8085) | Shares memory space |
| Address lines | 8 (A0–A7) | 16 (A0–A15) |
| Instructions | IN, OUT only | All memory instructions |
| Control signals | IOR, IOW | MEMR, MEMW |
| Data transfer | Only through accumulator | Any register |
| Decoding hardware | Simpler (fewer lines) | More complex |
| Memory available | Full 64 KB for memory | Reduced by the I/O addresses |
| Speed | Faster in general | Slower (longer instructions) |
| Arithmetic on I/O data | Not possible directly | Possible |

## Check yourself

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

1. Which is true of I/O mapped I/O in the 8085?
   A. All memory instructions can be used
   B. Arithmetic can be done directly on port data
   C. It uses MEMR and MEMW
   D. It uses IN and OUT, and data goes through the accumulator
   Answer: D. I/O mapped I/O uses IN/OUT with an 8-bit port address and transfers only through the accumulator. (Key point: I/O mapped instructions)

2. What is a disadvantage of memory mapped I/O?
   A. Part of the memory address space is used up by I/O addresses
   B. Only IN and OUT can be used
   C. Only 256 ports are possible
   D. Data can only pass through the accumulator
   Answer: A. The I/O devices occupy addresses in the memory map, so less memory is available, and full 16-bit decoding is needed. (Key point: Memory mapped drawback)

3. Which control signals does the 8085 use in memory mapped I/O?
   A. IOR and IOW with IO/M = 1
   B. IN and OUT with IO/M = 1
   C. MEMR and MEMW with IO/M = 0
   D. ALE only
   Answer: C. Memory mapped I/O is treated like memory (IO/M = 0, MEMR/MEMW); I/O mapped uses IO/M = 1 with IOR/IOW. (Key point: Control signals)

## Related in Microprocessor

- [Unique/non-unique decoding, memory mapped I/O](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Aunique-nonunique-decoding-memory-mapped-io) — Microprocessor, chapter 4

## Related in other subjects

- [Isolated I/O vs memory-mapped I/O](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Aisolated-vs-mmio) — Computer Organization and Architecture, chapter 7, asked 2×
- [Memory mapped versus isolated I/O](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Amemory-mapped-vs-standard-io) — Embedded System, chapter 5, asked 2×
- [Memory-mapped I/O reduces address space](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Ammio-address-space) — Computer Organization and Architecture, chapter 7
- [I/O mapped vs memory mapped I/O](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aiomapped-vs-memmapped) — Instrumentation II, chapter 2
