Memory Segmentation in 8086
Memory Segmentation in 8086
The 8086 microprocessor has a 20-bit address bus, which means it can access up to 1 MB (2²⁰ bytes) of memory.
However, its internal registers are only 16-bit, and thus can address only 64 KB directly.
These segments are accessed using segment registers that hold the starting address of a segment.
To access a specific location inside the segment, an offset (or index/pointer) is added.
The offset (like IP, SP, BP, SI, DI, BX) defines the location within that segment.
The 8086 microprocessor has a 16-bit data bus, meaning it can transfer 2 bytes (16 bits) of data at a time.
But, since memory is organized as 8-bit (1 byte) units, this leads to the need for a mechanism that can handle both
even and odd addresses efficiently.
🔸 Low Bank – Stores data at even addresses (e.g., 0000H, 0002H, ...)
🔸 High Bank – Stores data at odd addresses (e.g., 0001H, 0003H, ...)
Together, these banks allow 8086 to read/write 16-bit data efficiently, even though memory chips are 8-bit wide.
• A0 (Address line 0) – Used to identify if address is even (A0 = 0) or odd (A0 = 1).
• BHE̅ (Bus High Enable) – Active LOW signal, used to enable the higher byte (D8–D15).
A0 BHE̅ Operation
0 0 Access both lower and upper byte (16-bit, even address)
0 1 Access only lower byte (even address)
1 0 Access only upper byte (odd address)
Memory Banking is needed to ensure efficient use of the 16-bit data bus.
Faster execution