8086 Buses and Memory Architecture

Master the bus structure and memory organization of 8086 microprocessor with detailed explanations, practical examples, and numerical problems.

Bus System Overview and Architecture

The 8086 microprocessor communicates with external components through three distinct bus systems, each serving a specific purpose in data transfer and system coordination.

Complete Bus Specification

Bus TypeWidth (bits)FunctionDirectionKey Characteristics
Address Bus20Specify memory/I/O locationUnidirectional (CPU → Memory)Determines addressable space
Data Bus16Transfer data/instructionsBidirectional (CPU ↔ Memory)Determines transfer rate
Control BusVariableCoordinate operationsUnidirectional (CPU → System)Manages timing and control
Loading diagram...

Address Bus - Memory Addressing Foundation

The 20-bit address bus is the foundation of 8086's memory addressing capability, determining the maximum memory space accessible to the processor.

Address Bus Calculation Fundamentals

Core Formula:

Maximum Memory = 2^(Address Bus Width)

Address Range = 0 to (2^n - 1)

8086 Address Bus Analysis

Step-by-Step Calculation:

  1. Given: Address Bus = 20 bits
  2. Maximum Addresses: 2^20 = 1,048,576
  3. Memory Size: 1,048,576 bytes = 1 MB
  4. Address Range: 00000H to FFFFFH
  5. Hexadecimal Range: 0 to 1,048,575 (decimal)

Comparative Analysis - Address Bus Sizes

Address Bus (bits)Maximum AddressesMemory SizeAddress Range (Hex)Example Processors
8256256 B00H - FFHSimple microcontrollers
124,0964 KB000H - FFFHEarly microprocessors
1665,53664 KB0000H - FFFFH8085, Z80
201,048,5761 MB00000H - FFFFFH8086, 8088
2416,777,21616 MB000000H - FFFFFFH80286
324,294,967,2964 GB00000000H - FFFFFFFFH80386, 80486

Practical Address Bus Problems

Problem 1: Custom Address Bus

Question: A processor has an 18-bit address bus. Calculate:

  • Maximum memory addressable
  • Address range in hexadecimal
  • Memory size in KB and MB

Solution:

  • Maximum Memory = 2^18 = 262,144 bytes
  • Address Range: 00000H to 3FFFFH
  • Memory Size: 256 KB = 0.25 MB

Problem 2: Required Address Bus

Question: How many address lines are needed to address 8 MB of memory?

Solution:

  • Required Memory = 8 MB = 8 × 1024 × 1024 = 8,388,608 bytes
  • 2^n ≥ 8,388,608
  • 2^23 = 8,388,608
  • Answer: 23 address lines required
Loading diagram...

Data Bus - Information Transfer Highway

The 16-bit data bus determines how much information can be transferred between the CPU and memory/I/O devices in a single operation.

Data Bus Impact on System Performance

Key Performance Metrics:

Data Bus WidthBytes per Transfer16-bit Data TransferRelative SpeedMemory Cycles
8 bits1 byte2 memory cycles1x (baseline)More cycles
16 bits2 bytes1 memory cycle2x fasterFewer cycles
32 bits4 bytes1 memory cycle4x fasterMinimum cycles

8086 vs 8088 - The Critical Difference

Feature80868088Impact
External Data Bus16 bits8 bits2x speed difference
Internal Architecture16 bits16 bitsSame processing power
Memory Interface16-bit wide8-bit wideCost vs performance
16-bit Data Fetch1 memory cycle2 memory cycles50% speed penalty
CostHigherLowerMarket positioning
Pin Count40 pins40 pinsSame package

Data Transfer Performance Examples

Example 1: Transferring 1000 bytes

ProcessorData BusMemory AccessesTime (relative)
80858 bits1000100%
80888 bits1000100%
808616 bits50050%

Example 2: Reading 16-bit instruction

  • 8086: Single memory read → Faster execution
  • 8088: Two memory reads → Slower execution
  • Performance impact: 8086 is approximately 30-40% faster overall
Loading diagram...

Control Bus - System Coordination

The control bus carries various control signals that coordinate and synchronize all data transfer operations in the 8086 system.

Essential Control Signals

Signal NameSymbolFunctionActive StateSource
ReadREAD̄ or RD̄Indicates CPU wants to read dataActive LOW (0)CPU Output
WriteWRITĒ or WR̄Indicates CPU wants to write dataActive LOW (0)CPU Output
Memory/IOM/IO̱Selects memory or I/O operationHIGH=Memory, LOW=I/OCPU Output
Address Latch EnableALELatches address from multiplexed busActive HIGH (1)CPU Output
Data Transmit/ReceiveDT/R̄Controls data bus directionHIGH=Transmit, LOW=ReceiveCPU Output

Four Basic Operations

Control signals combine to create four fundamental data transfer operations:

OperationM/IO̱READ̄WRITĒDescriptionExample
Memory Read101CPU reads from memoryFetch instruction
Memory Write110CPU writes to memoryStore data
I/O Read001CPU reads from I/O portRead keyboard
I/O Write010CPU writes to I/O portSend to printer

Control Signal Timing

Typical Memory Read Cycle:

  1. CPU places address on address bus
  2. ALE goes HIGH to latch address
  3. M/IO̱ = 1 (memory operation)
  4. READ̄ = 0 (read operation)
  5. Memory places data on data bus
  6. CPU reads data
  7. READ̄ = 1 (end of cycle)
Loading diagram...

Memory Organization and Data Storage

Understanding how 8086 organizes memory and stores data is crucial for effective programming and system design.

Memory Organization Hierarchy

LevelAddress RangeSizeTypical UsageAccess Speed
Interrupt Vectors00000H - 003FFH1 KBInterrupt service routinesFast
System RAM00400H - 9FFFFH640 KBUser programs and dataMedium
Video MemoryA0000H - BFFFFH128 KBDisplay bufferFast
Extended ROMC0000H - EFFFFH192 KBAdapter ROMsSlow
System ROMF0000H - FFFFFH64 KBBIOS and bootstrapSlow

Fundamental Memory Rules

Rule 1: Memory Cell Size

One memory location stores exactly one byte (8 bits) of data

  • Smallest addressable unit = 1 byte
  • Each address points to 1 byte
  • Larger data requires multiple locations

Rule 2: Sequential Addressing

Consecutive memory locations have consecutive addresses

  • Address N stores first byte
  • Address N+1 stores second byte
  • Pattern continues for larger data

Rule 3: Data Alignment

Multi-byte data follows specific storage rules

  • 16-bit data: 2 consecutive bytes
  • 32-bit data: 4 consecutive bytes
  • Byte order follows Little Endian format
Loading diagram...

Little Endian Format - Intel's Byte Order

The 8086 processor uses Little Endian format for storing multi-byte data, which affects how programmers work with memory.

Little Endian Rule Explained

Definition:

"The least significant byte (lower byte) is stored at the lower memory address"

Why "Little Endian"?

  • Term from Jonathan Swift's "Gulliver's Travels"
  • Little-endians cracked eggs at the small end
  • In computing: "little end" (LSB) comes first

16-bit Data Storage Examples

Example 1: Data = 1234H at address 5000H

AddressData StoredBinarySignificance
5000H34H00110100Lower byte (LSB)
5001H12H00010010Higher byte (MSB)

Example 2: Data = ABCDH at address 7000H

AddressData StoredBinarySignificance
7000HCDH11001101Lower byte (LSB)
7001HABH10101011Higher byte (MSB)

Example 3: Data = 9876H at address 2000H

AddressData StoredDecimal ValueSignificance
2000H76H118Lower byte (LSB)
2001H98H152Higher byte (MSB)

Little Endian vs Big Endian

FormatByte OrderExample (1234H)Used ByAdvantage
Little EndianLSB first34H at 1000H, 12H at 1001HIntel x86, ARM (optional)Easy arithmetic operations
Big EndianMSB first12H at 1000H, 34H at 1001HMotorola, Network protocolsIntuitive reading
Loading diagram...

Practical Problems and Calculations

Memory Address Calculations

Problem Set 1: Address Bus Calculations

Problem 1A:

Question: A processor has a 19-bit address bus. Calculate the maximum memory it can address in KB and MB.

Solution:

  1. Maximum addresses = 2^19 = 524,288
  2. Memory in bytes = 524,288 bytes
  3. Memory in KB = 524,288 ÷ 1024 = 512 KB
  4. Memory in MB = 512 ÷ 1024 = 0.5 MB
Problem 1B:

Question: How many address lines are needed to directly address 16 MB of memory?

Solution:

  1. Required memory = 16 MB = 16 × 1024 × 1024 = 16,777,216 bytes
  2. Find n such that 2^n ≥ 16,777,216
  3. 2^24 = 16,777,216
  4. Answer: 24 address lines required

Problem Set 2: Little Endian Storage

Problem 2A:

Question: Store the 16-bit data 8A5FH starting at memory address 4000H using Little Endian format.

Solution:

AddressData StoredExplanation
4000H5FHLower byte (LSB) at lower address
4001H8AHHigher byte (MSB) at higher address
Problem 2B:

Question: Memory locations 6000H contains 3DH and 6001H contains 7BH. What 16-bit data is stored starting at 6000H?

Solution:

  1. Address 6000H = 3DH (Lower byte)
  2. Address 6001H = 7BH (Higher byte)
  3. Using Little Endian format: Higher byte first in value
  4. 16-bit data = 7B3DH

Problem Set 3: Data Transfer Performance

Problem 3A:

Question: Compare the number of memory accesses required to transfer 2000 bytes using 8086 vs 8088.

Solution:

  • 8086 (16-bit data bus): 2000 ÷ 2 = 1000 memory accesses
  • 8088 (8-bit data bus): 2000 ÷ 1 = 2000 memory accesses
  • Performance ratio: 8086 is 2x faster for bulk transfers
  • Time savings: 50% reduction in memory cycles

Summary and Key Takeaways

Essential Points to Remember:

Bus System Fundamentals

  • Address Bus (20-bit): Determines 1 MB maximum memory
  • Data Bus (16-bit): Enables 2-byte transfers per cycle
  • Control Bus: Coordinates all system operations

Memory Calculations

  • Formula: Memory = 2^(address bits)
  • 8086 Range: 00000H to FFFFFH (1 MB)
  • Unit Rule: 1 memory location = 1 byte

Performance Implications

  • 8086 vs 8088: 2x speed advantage for 8086
  • Data width: Directly affects transfer rate
  • Memory cycles: Fewer cycles = better performance

Little Endian Storage

  • Rule: Lower byte at lower address
  • Format: LSB first, then MSB
  • Intel Standard: Used throughout x86 family

Advanced Memory Banking Concepts

Memory banking extends the 8086's memory capabilities beyond the basic 1MB limit through sophisticated memory organization techniques.

Two-Bank Memory System

The most common banking implementation divides memory into even and odd address banks, enabling parallel access for improved performance.

Loading diagram...

Banking Performance Benefits

Access TypeSingle BankBanked SystemImprovement
Word Access (aligned)2 memory cycles1 memory cycle100% faster
Sequential Access4 cycles per word2 cycles per word100% faster
Byte Access1 memory cycle1 memory cycleNo difference

Extended Banking for Memory Expansion

Beyond the 1MB limit, extended banking systems use bank switching to access additional memory:

Bank Switching Principles:
  • Window Mapping: Map 64KB windows to different physical banks
  • Software Control: I/O port or memory-mapped bank selection
  • EMS/XMS Standards: Standardized extended memory access
  • Application Transparency: Bank switching handled by OS/drivers
Practical Banking Example:

System Configuration:

  • Base Memory: 640KB (standard DOS)
  • Extended Memory: 15MB (banked access)
  • Bank Size: 64KB per bank
  • Switching Method: I/O port 0x40

Related Topics to Explore

Loading diagram...

Suggetested Articles