Notes on the Intel 8086 processor's arithmetic-logic unit
Ken Shirriff · Jan 23, 2026
AI summary AI-generated, may contain mistakes
This article explores the control circuitry of the Intel 8086 processor's arithmetic-logic unit (ALU), explaining how machine instructions are executed through microcode micro-instructions that first configure the ALU and then retrieve its result in a separate step. It details how hardware components—including latches, flip-flops, Programmable Logic Arrays (PLAs), the XI multiplexer, and lookup-table (LUT) circuitry—decode instructions and generate the control signals needed to reconfigure the ALU for its 28 operations, handling special cases such as carry handling, BCD adjustments, and shifts. The author concludes that this pervasive complexity reflects the 8086's CISC design, in contrast to the simpler circuitry of RISC processors.
In 1978, Intel introduced the 8086 processor, a revolutionary chip that led to the modern x86 architecture.
Unlike modern 64-bit processors, however, the 8086 is a 16-bit chip.
Its arithmetic/logic unit (ALU) operates on 16-bit values, performing arithmetic operations such as addition and subtraction,
as well as logic operations including bitwise AND, OR, and XOR.
The 8086's ALU is a complicated part of the chip, performing 28 operations in total.1
In this post, I discuss the circuitry that controls the ALU, generating the appropriate control signals for a
particular operation.
The process is more complicated than you might expect. First, a machine code instruction results in the execution of multiple
microcode instructions.
Using the ALU is a two-step process: one microcode instruction (micro-instruction) configures the ALU for the desired operation,
while a second
micro-instruction gets the results from the ALU.
Moreover, based on both the microcode micro-instruction and the machine code instruction, the control circuitry sends control signals to the ALU,
reconfiguring it for the desired operation.
Thus, this circuitry provides the "glue" between the micro-instructions and the ALU.
The die photo below shows the 8086 processor under a microscope.
I've labeled the key functional blocks.
Architecturally, the chip is partitioned into a Bus Interface Unit (BIU) at the top and an Execution Unit (EU) below.
The BIU handles bus and memory activity as well as instruction prefetching, while the Execution Unit (EU) executes the instructions.
In the lower right corner, the microcode ROM holds the micro-instructions.
The ALU is in the lower left corner, with bits 7-0 above and bits 15-8 below, sandwiching the status flag circuitry.
The ALU control circuitry, highlighted in red at the bottom of the chip, is the focus of this article.
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.