Conditions in the Intel 8087 floating-point chip's microcode
Ken Shirriff · Dec 30, 2025
AI summary AI-generated, may contain mistakes
The article describes reverse-engineering the Intel 8087 floating-point coprocessor's microcode, focusing on the 49 conditional tests that its microcode engine uses to control jumps, subroutine calls, and returns within the 1648 micro-instructions stored in the chip. Based on microscope photos of the silicon die, the author explains how a distributed tree of pass-transistor multiplexers selects one of 64 possible conditions (49 implemented) based on bits in each micro-instruction, reducing long-distance wiring across the chip. The conditions range from simple checks like zero or negative values to specialized tests involving instruction opcode bits, register tag bits, rounding modes, and exception handling.
In the 1980s, if you wanted your computer to do floating-point calculations faster, you could buy
the Intel 8087 floating-point coprocessor chip.
Plugging it into your IBM PC would make operations up to 100 times faster, a big boost for spreadsheets
and other number-crunching applications.
The 8087 uses complicated algorithms to compute trigonometric, logarithmic, and exponential functions.
These algorithms are implemented inside the chip in microcode.
I'm part of a group that is reverse-engineering this microcode.
In this post, I examine the 49 types of conditional tests that the 8087's microcode uses inside its algorithms.
Some conditions are simple, such as checking if a number is zero or negative, while others are specialized,
such as determining what direction to round a number.
To explore the 8087's circuitry, I opened up an 8087 chip and took numerous photos of the silicon die with a microscope.
Around the edges of the die, you can see the hair-thin bond wires that connect the chip to its 40 external pins.
The complex patterns on the die are formed by its metal wiring, as well as the polysilicon and silicon underneath.
The bottom half of the chip is the "datapath", the circuitry that performs calculations on 80-bit floating point values.
At the left of the datapath, a constant ROM holds important constants such as π.
At the right are the eight registers that the
programmer uses to hold floating-point values; in an unusual design decision,
these registers are arranged as a stack.
Die of the Intel 8087 floating point unit chip, with main functional blocks labeled. The die is 5mm×6mm. Click for a larger image.
Keep reading
Out of respect for the author only the opening is shown here. Read the rest on the original site, or in HorizonReader with highlights, notes and AI help.
AI summaryWhile examining unidentified vintage ICs, the author reverse engineered a chip under a microscope and determined it was the Signetics ST680A from 1965, a quad NAND gate implemented with diode-transistor logic (DTL), part of the first IC family offered in a plastic DIP package. The article explains the chip's construction from bipolar transistors, diodes, and serpentine resistors, as well as how DTL NAND gates operate. Notably, the same silicon die was reused for at least three different chips (the 680A, 670A, and 616A) by applying different metal layers, a cost-saving technique Signetics used for both semi-custom and standard ICs.
AI summaryThis article examines the Intel 8087, a 1980 floating-point coprocessor that dramatically sped up arithmetic in the IBM PC, focusing on how its microcode and circuitry implement floating-point addition and subtraction. By decapping the chip and studying its die, the author explains key components such as the microcode ROM, the 80-bit datapath, the 69-bit integer adder, and the bit shifter. It also walks through the algorithm: aligning exponents by shifting significands, performing integer addition or subtraction, normalizing the result, and handling special cases like zero results, negative outcomes, infinities, and denormalized values.
AI summaryThe author analyzed a mysterious Harris IC labeled 'F1-10-5' and identified it as Harris's 1985 version of the MF10 switched-capacitor filter chip from National Semiconductor. The chip implements analog filters by rapidly switching 72 small polysilicon capacitors in and out of the circuit with CMOS switches, replacing resistors so that filter accuracy depends on stable capacitance ratios and a precise clock frequency rather than on-chip component values. Using a state variable filter design with three op-amps per filter, the chip provides high-pass, band-pass, and low-pass outputs while employing isolation rings, shield layers, and other techniques to suppress clock switching noise.
AI summaryThe article describes how the author reverse-engineered Intel's vintage 8087 floating-point chip—by examining its die and microcode—to explain the algorithm behind its FPTAN tangent instruction. The 8087 combined the CORDIC algorithm (16 iterations using precomputed special angles) with a Padé approximant rational polynomial (3x/(3-x²)) applied to the tiny residual angle, achieving 64-bit accuracy while avoiding a costly division since the instruction returns separate numerator and denominator values. The three-phase process—pseudo-division to determine CORDIC decision bits, rational approximation of the remaining angle, and pseudo-multiplication to apply the rotations—let the chip compute a tangent in 90 microseconds versus 13,000 microseconds on the 8086.
AI summaryThis article examines the microcode of Intel's 8087 floating-point coprocessor, focusing on the FSCALE instruction, which scales a floating-point number by a power of two much faster than a full multiplication. Although FSCALE seems trivial—just adding an integer to the number's exponent—the author, working with the Opcode Collective to reverse-engineer the chip's microcode, finds it uses over 140 micro-instructions and three levels of subroutine calls to handle special cases such as zeros, NaNs, denormals, and overflow/underflow. Along the way, the analysis illustrates key parts of the 8087's datapath, including the shifter, adder, and exponent converter, and reveals a hidden feature of the chip.