Introduced by Intel in 1980, the 8087 co-processor was designed to accelerate floating-point operations for the IBM PC and other systems. While modern processors handle these calculations natively, the 8087 relied on a sophisticated combination of dedicated circuitry and microcode to achieve performance gains of nearly 100 times over the standard 8086 processor for basic arithmetic. The chip's architecture is divided into a microcode ROM, which contains 1,648 instructions, and a datapath responsible for executing calculations on 80-bit values.

Close-up diagram of the 8087 datapath functional blocks.
A detailed view of the 8087's datapath, highlighting the functional blocks used for arithmetic operations.www.righto.com

This figure shows the datapath responsible for executing calculations on 80-bit values as described in the first paragraph.

Floating-point arithmetic is significantly more complex than integer math because the binary points of numbers must be aligned before any operation can occur. For example, in addition, the significand of the number with the smaller exponent must be shifted to the right until the exponents match. The 8087 facilitates this through a large bit shifter and leading-zero circuitry, which counts the number of zero bits to determine the necessary shift amount. For subtraction, the process is similar but includes additional logic to handle negative results and cases where the result is zero, which prevents standard normalization.

Circuitry diagram for detecting leading zero bits.
The specialized circuitry used to detect leading zero bits to determine the necessary shift amount for alignment.www.righto.com

This image depicts the leading-zero circuitry used to align binary points during floating-point addition and subtraction.

Internally, the 8087 uses an 80-bit "temporary real" format, featuring a 15-bit exponent and a 64-bit significand. The chip manages these values using a stack of eight internal registers, each tagged as zero, valid, special, or empty. The core of the processing is a 69-bit integer adder that performs the actual math, while the microcode manages the flow of data between registers, handles special cases like infinities, and performs the necessary normalization shifts. By offloading these complex alignment and rounding steps to specialized hardware, the 8087 provided a massive leap in computational capability for its era.

Diagram of the 80-bit temporary real format and internal register structures.
The 8087 uses an 80-bit temporary real format with a 15-bit exponent and a 64-bit significand.www.righto.com

This diagram illustrates the internal 80-bit temporary real format and the register stack structure mentioned in the third paragraph.

Flowchart of common microcode for basic arithmetic operations.
A flowchart illustrating the microcode logic used to manage data flow and normalization during arithmetic operations.www.righto.com

This flowchart represents the microcode's role in managing data flow and handling special cases like infinities.