Difference between revisions of "Intel 8086"
(→Architecture) |
m (→Architecture) |
||
Line 19: | Line 19: | ||
= Architecture = | = Architecture = | ||
− | Fun fact: Most sources claim that the 8086 has 29,000 transistors. But actually, it has only 19,618 transistors. [https://www.righto.com/2023/01/counting-transistors-in-8086-processor.html Source] | + | Fun fact: Most sources claim that the 8086 has about 29,000 transistors. But actually, it has only 19,618 transistors. [https://www.righto.com/2023/01/counting-transistors-in-8086-processor.html Source] |
− | To put it into perspective, 64KB of DRAM contains | + | To put it into perspective, 64KB of DRAM contains 524,288 transistors, as 1 bit of DRAM needs 1 transistor. |
== Hybrid Internal Design == | == Hybrid Internal Design == |
Revision as of 05:30, 2 February 2025
The Intel 8086 is a landmark 16‑bit microprocessor introduced by Intel in 1978. It was the first in the x86 family and established many architectural conventions that continue to influence modern personal computing.
With a hybrid internal design—featuring 16‑bit registers and a 16‑bit arithmetic logic unit (ALU) paired with a 20‑bit external address bus—the 8086 could directly address 1 megabyte of memory, a significant leap over its 8‑bit predecessors.
Although there were definitely other CPUs in use in the 1980s, the vast majority of microcomputers people had at home or at the office used either a MOS 6502 (or one of its variants), a Zilog Z80, an early member of the Intel 8086 family, or a Motorola 68000.
Contents
[hide]History
Developed in the mid‑1970s as a response to the growing need for greater processing power and memory capacity, the 8086 was designed to bridge the gap between earlier 8‑bit processors (like the Intel 8080 and 8085) and the future of 16‑bit computing.
The chip’s design was partly influenced by the need to maintain some backward compatibility with 8‑bit software while also providing a richer instruction set for high‑level languages such as Pascal and PL/M.
Although the IBM PC later used the nearly identical 8088 (which featured an 8‑bit external data bus for cost savings), the 8086 itself became the architectural blueprint for the x86 family, directly influencing later processors.
Architecture
Fun fact: Most sources claim that the 8086 has about 29,000 transistors. But actually, it has only 19,618 transistors. Source
To put it into perspective, 64KB of DRAM contains 524,288 transistors, as 1 bit of DRAM needs 1 transistor.
Hybrid Internal Design
Internally, the 8086 features a 16‑bit execution unit (EU) that performs arithmetic, logic, and control functions, while a separate bus interface unit (BIU) handles all data transfers and external communications.
The BIU includes a six‑byte prefetch queue that overlaps instruction fetching with execution, improving overall throughput. Externally, the 20‑bit address bus—combined with a 16‑bit data bus—enables the processor to access up to 1 megabyte of physical memory.
Memory Segmentation
To overcome the 16‑bit limitation of its registers while still addressing 1 MB of memory, the 8086 employs a segmented memory model.
In this scheme, memory addresses are formed by shifting a 16‑bit segment register four bits to the left and then adding a 16‑bit offset. This results in a 20‑bit physical address.
Although this model can be seen as complex, it allowed small programs (fitting within a 64‑KB segment) to be loaded at a fixed offset, simplifying relocation in many cases.
Register Structure
The 8086 provides fourteen 16‑bit registers. Its register file includes:
- Data Registers: AX (accumulator), BX (base), CX (counter), and DX (data). Each accessible as high (AH, BH, CH, DH) and low (AL, BL, CL, DL) 8‑bit registers.
- Pointer and Index Registers: SP (stack pointer), BP (base pointer), SI (source index), and DI (destination index) used for addressing and data manipulation.
- Segment Registers: CS (code), DS (data), SS (stack), and ES (extra) which define the memory segments for program code, data, and the stack.
- Instruction Pointer and Flags: A 16‑bit instruction pointer (IP) and a 16‑bit status register (Flags). This register includes six status flags (zero, carry, sign, overflow, parity, and auxiliary carry) to indicate the outcomes of operations. It also contains three control flags: the Direction Flag controls the direction in which string instructions act, the Interrupt Flag to enable/disable interrupts and the Trap Flag for single-step debugging.
Internal Registers
The 8086 has several internal registers that are invisible to the programmer but are used by the microcode.
Memory accesses use the Indirect (IND) and Operand (OPR) registers; the IND register holds the address in the segment, while the OPR register holds the data value that is read or written.
Although these registers are normally not accessible by the programmer, some undocumented instructions provide access to these registers.
Instruction Set
As a complex instruction set computer (CISC), the 8086 supports a rich array of operations, including multiple addressing modes such as register, immediate, and memory addressing.
Although most operations execute on 16‑bit operands, the chip allows manipulation of 8‑bit data as well—an important feature for compatibility with legacy 8‑bit software.
Block Diagram
Links
- Intel 8086 at the English-language Wikipedia
- Intel Microprocessors Practical Reference
- 8086 Programmer's Pocket Reference Guide
- Micro Chart 8086 CPU reference card
- Undocumented 8086 instructions
- 8086 microcode disassembled
- Tom Harte's SingleStepTests