Q3Microprocessor and Interfaces
Question
Explain the concept of real mode and protected mode in 8086.
Answer
Real mode and protected mode are the two fundamental operating modes of the x86 processor family, differing in how they compute physical addresses and whether they enforce memory protection and multitasking.
The 8086 itself supports only a single mode of operation, now retroactively called Real Mode, since later 80x86 processors (starting with the 80286) introduced an alternative called Protected Mode. Both terms describe how the CPU interprets segment registers and manages memory access.
Real Mode
In Real Mode, the processor behaves exactly like the original 8086. Segment registers hold a 16-bit base value that is directly shifted left by 4 bits and added to a 16-bit offset to form a 20-bit physical address, restricting the CPU to a maximum of 1 MB of addressable memory. There is no memory protection whatsoever: any running program can read or write any physical address, including memory belonging to the operating system or other programs, and there is no hardware support for multitasking or virtual memory. This makes real mode simple and fast, but fragile - a single misbehaving program can crash the entire system.
Protected Mode
Protected Mode, introduced with the Intel 80286 and greatly expanded in the 80386, reinterprets the segment register as a selector - an index into a descriptor table (GDT/LDT) rather than a direct address multiplier. Each descriptor specifies a segment's base address, length limit, and access rights (read-only, execute-only, privilege level). This allows the hardware to enforce memory protection by trapping any attempt to access memory outside a segment's bounds or to execute a privileged operation from user code, and it enables true multitasking with isolated address spaces for each process, plus support for virtual memory beyond the 1 MB real-mode limit.
Key Distinction
The 8086 hardware itself is incapable of protected mode; it exists purely in real mode. Every x86 PC still boots into real mode for backward compatibility and switches into protected mode under operating system control, which is why understanding the 8086's real-mode addressing scheme remains foundational even for modern 32-bit and 64-bit x86 systems.