Ken Shirriff

Ken Shirriff

@righto.com

Computer history. Reverse-engineering old chips. Restored Apollo Guidance Computer, Alto. Ex-Google, Sun, Msft. So-called boffin.

6.4K followers437 following470 posts

Have you ever thought about how your computer adds and subtracts? It takes a lot of hardware to handle floating-point numbers like 12.34. I opened up Intel's 8087 math coprocessor chip from 1980 to see how it works...

View full thread

Although the 8087 chip was complicated, it became popular because its made floating-point operations 100 times faster on the IBM PC and other systems. Its math became the standard (IEEE 754) used by all modern computers, so every time you do math, thank the 8087 chip :-)

Have you ever thought about how your computer adds and subtracts? It takes a lot of hardware to handle floating-point numbers like 12.34. I opened up Intel's 8087 math coprocessor chip from 1980 to see how it works...

View full thread

The 8087 chip went beyond regular numbers, supporting special values such as infinities, positive and negative 0, Not-A-Number. Computer scientist W. Kahan made sure special values were handled in mathematically sensible ways, so the chip had pages of special-case rules to follow.

The 8087 chip's microcode implemented infinity and other special cases in complicated code. This flowchart shows part of the code. Don't worry, you're not expected to understand this "spaghetti" code :-) The point is that there's a lot going on.

Have you ever thought about how your computer adds and subtracts? It takes a lot of hardware to handle floating-point numbers like 12.34. I opened up Intel's 8087 math coprocessor chip from 1980 to see how it works...

With a microscope, I zoomed in on the tiny silicon die and identified the circuitry. The ROM holds the software (microcode) that controls the chip. The adder is the heart of the chip, while the shifter aligns numbers, sliding them back and forth.

Subtracting two floating-point numbers, say 8-7.5, takes a few steps. Floating-point numbers are stored as a power of 2 times a binary number. The numbers are shifted so the exponents align, and then subtracted in binary. To get rid of zeros at the front, the result is shifted (normalized).

I opened up a mystery chip; it turned out to be a "switched capacitor filter" from 1984. Filters are important circuits, for example, adjusting the bass or treble in an audio signal. This chip, the MF10, was popular because it combined two filters into an easy-to-use chip. Let's take a closer look…

View full thread

The heart of most analog circuits is the operational amplifier, or op-amp. Op-amps are very flexible; in this chip, they integrate signals. The op-amp is interesting under the microscope; its transistors have various sizes and patterns.

I opened up a mystery chip; it turned out to be a "switched capacitor filter" from 1984. Filters are important circuits, for example, adjusting the bass or treble in an audio signal. This chip, the MF10, was popular because it combined two filters into an easy-to-use chip. Let's take a closer look…

View full thread

Here's a close-up of one of the electronic switches. It uses four transistors and acts as a toggle switch. To prevent interference, the transistors are surrounded by two isolation rings. For the second photo, I removed the metal layer with acid to reveal the polysilicon and silicon underneath.

The switched capacitor is a bit bizarre. By opening and closing the switches at high frequency, charge moves in and out of the capacitor at a controlled rate, just like a resistor. Why replace a resistor with a complicated circuit? Because resistors are large and very inaccurate on chips.

I opened up a mystery chip; it turned out to be a "switched capacitor filter" from 1984. Filters are important circuits, for example, adjusting the bass or treble in an audio signal. This chip, the MF10, was popular because it combined two filters into an easy-to-use chip. Let's take a closer look…

View full thread

Under the microscope, a tiny map of Florida is visible. Harris, the manufacturer, was in Melbourne, Florida; the stylized H is the logo. The chip has various initials, presumably the names of the designers of the chip.

The chip contains two filters; the top and bottom filters are mirror images. The chip contains 72 tiny capacitors, the pink squares in the middle. Above the capacitors are electronic switches, which switch the capacitors in and out of the circuit at high speed.

I opened up a mystery chip; it turned out to be a "switched capacitor filter" from 1984. Filters are important circuits, for example, adjusting the bass or treble in an audio signal. This chip, the MF10, was popular because it combined two filters into an easy-to-use chip. Let's take a closer look…

At first, we couldn't identify this mystery chip from Harris. Since it had a ceramic package, I could easily open it by tapping it along the seam with a chisel, popping the lid off and revealing the tiny silicon die inside.

How do computers calculate complicated trig functions such as tangent? I took a look at Intel's 8087 floating-point chip under the microscope to find out. The chip combines two techniques to evaluate the tan function quickly and accurately: polynomials and an algorithm called CORDIC...

View full thread

Credits: I've been working on this with the members of the "Opcode Collective", especially Smartest Blob and @gloriouscow.bsky.social, who used ML to convert ROM images to microcode data and extensively analyzed the contents. 7/7

How do computers calculate complicated trig functions such as tangent? I took a look at Intel's 8087 floating-point chip under the microscope to find out. The chip combines two techniques to evaluate the tan function quickly and accurately: polynomials and an algorithm called CORDIC...

View full thread

CORDIC became popular, especially in scientific calculators. The 8087 chip uses CORDIC, but goes further, also using a polynomial ratio to get more accuracy. The simple function 3x/(3-x^2) (blue) is surprisingly close to the tangent (red), better than a Taylor series (green).

The 8087 chip implements its algorithms in microcode, specialized low-level code inside the chip. By examining the microcode ROM under a microscope, the Opcode Collective extracted the bits and I reverse-engineered the algorithm.

How do computers calculate complicated trig functions such as tangent? I took a look at Intel's 8087 floating-point chip under the microscope to find out. The chip combines two techniques to evaluate the tan function quickly and accurately: polynomials and an algorithm called CORDIC...

Back in 1956, the Mach-2 B-58 Hustler had an analog navigation computer. It wasn't accurate enough, so they built a digital replacement. Sines and cosines are easy in analog, but needed a new digital algorithm. They invented the CORDIC algorithm and built the 134-pound CORDIC computer.

Usually, rotating a vector by an angle requires complicated math. But for some special angles, the calculation requires just shifts and adds, easy to do in hardware. The CORDIC algorithm breaks down an angle into special angles (using a table), does quick vector rotations, producing the trig answer.

In 1980, Intel introduced the 8087 floating-point coprocessor chip. Plugging this chip into your IBM PC made math 100 times faster, good for CAD and spreadsheets. I opened up the chip to reverse-engineer exactly how it does complicated calculations. Let's take a look inside...

View full thread

In 1980, Intel introduced the 8087 floating-point coprocessor chip. Plugging this chip into your IBM PC made math 100 times faster, good for CAD and spreadsheets. I opened up the chip to reverse-engineer exactly how it does complicated calculations. Let's take a look inside...

View full thread

Knowing the contents of the 8087's microcode is just the first step; we've been working for months to assign meaning to the 0s and 1s. I've been reverse-engineering the circuitry in the 8087, units such as an adder, shifter, and registers, to understand what the microcode is doing.

I can now explain the microcode for an instruction called FSCALE that scales a number by a power of 2. It sounds simple, but the 8087 has an appalling number of special cases: positive and negative 0, two infinities, four rounding modes, three number sizes, six exceptions... so the code is complex.

In 1980, Intel introduced the 8087 floating-point coprocessor chip. Plugging this chip into your IBM PC made math 100 times faster, good for CAD and spreadsheets. I opened up the chip to reverse-engineer exactly how it does complicated calculations. Let's take a look inside...

Under a microscope, you can see the circuitry of the 8087. The 8087 performs its calculations using low-level software called microcode, stored in the large ROM in the middle. Along with the "Opcode Collective", I'm trying to understand the algorithms in the microcode, from addition to arctangents.

Zooming in on the microcode storage ROM, you can see the individual transistors, the pinkish blobs. The 8087 is very unusual, using four transistor sizes, giving it double density: 2 bits per transistor. The Opcode Collective examined all 13184 transistors, revealing the 0s and 1s of the microcode.

Before semiconductor RAM, most computers used magnetic core memory. This is the 32 KB core stack from the computer on Spacelab, the Space Shuttle's experimental laboratory. Let's take a closer look...

View full thread

Before semiconductor RAM, most computers used magnetic core memory. This is the 32 KB core stack from the computer on Spacelab, the Space Shuttle's experimental laboratory. Let's take a closer look...

View full thread

This photo shows the computer with one of its logic boards removed. The core memory occupies the right third of the computer. The round military-style connectors on the front of the computer connected to other systems on Spacelab. CIMSA was the manufacturer.

Before semiconductor RAM, most computers used magnetic core memory. This is the 32 KB core stack from the computer on Spacelab, the Space Shuttle's experimental laboratory. Let's take a closer look...

View full thread

Core memories usually have an "inhibit" wire for writing data back. The core memory board uses a more complicated "2½D" design, which eliminates the inhibit wire. Three wires—X, Y, and sense—go through each core. The sense wires cross each other in the middle; this reduces the noise they pick up.

The core memory stack has two driver boards that generate the high-current pulses through the X and Y wires. The boards are crammed with integrated circuits that were specially designed for core memory systems.

Before semiconductor RAM, most computers used magnetic core memory. This is the 32 KB core stack from the computer on Spacelab, the Space Shuttle's experimental laboratory. Let's take a closer look...

View full thread

The back side of each core memory board is crammed with chips. 18 sense amplifier chips (yellow) provide 18 bits of output (16 bits+parity+storage protection). A multitude of diode modules are connected to the core plane's vertical wires (red) and horizontal wires (blue).

The core memory is arranged with 16 horizontal lines of cores to store each of the 18 bits in a word. This photo shows how the tiny wires from the core plane are soldered to the much larger traces on the circuit board.

Before semiconductor RAM, most computers used magnetic core memory. This is the 32 KB core stack from the computer on Spacelab, the Space Shuttle's experimental laboratory. Let's take a closer look...

View full thread

Each tiny ring can be magnetized clockwise or counterclockwise to store a 0 or 1. Putting a current through an X wire and a Y wire in the grid magnetizes the core where the two wires cross. Special magnetic materials ensure that the other cores are unaffected. The sense wire reads out the data.

Spacelab used three French-built minicomputers, model Mitra 125 MS. This photo shows the core memory stack in front of the computer. (The computer looks empty because I removed the circuit boards for analysis.) The computer is surprisingly heavy; it has a lot of metal for conduction cooling.

Before semiconductor RAM, most computers used magnetic core memory. This is the 32 KB core stack from the computer on Spacelab, the Space Shuttle's experimental laboratory. Let's take a closer look...

Magnetic core memory uses tiny ferrite rings, one for each bit of storage. The rings are arranged in a grid, with tiny copper wires threaded vertically and horizontally to select a core. To read a value, the green "sense" wire snakes through all the cores. Each ring is 32 mils (0.8mm) in diameter.

This vacuum tube module was used in an IBM programmable calculator from 1948. This module, called a "trigger", stored one bit of information. Let's take a closer look and see the module operate.

View full thread

This vacuum tube module was used in an IBM programmable calculator from 1948. This module, called a "trigger", stored one bit of information. Let's take a closer look and see the module operate.

View full thread

I've powered up the trigger module in this video. It is switched on or off by two inputs and remembers its state until switched again. I push two buttons to turn it on or off, and its state is displayed by two vintage neon bulbs. This may seem trivial, but it is a key component of computers.

The IBM 604 calculator used about 1300 tubes and rented for $550 a month. It was a very popular system with over 5600 units produced. IBM advertised it as equivalent to 150 engineers.

This vacuum tube module was used in an IBM programmable calculator from 1948. This module, called a "trigger", stored one bit of information. Let's take a closer look and see the module operate.

View full thread

Before transistors, vacuum tubes were widely used as switches and ampifiers. A heater heats up the cathode, which emits electrons. They are attracted to the plate, causing current to flow. A negative voltage on the grid blocks the electrons, controlling the current flow.

The tube module uses a "dual triode" tube, two amplifiers in one glass tube. In the first photo, the two vertical dark rectangles are the two plates. The second photo shows the tube powered up, with the heaters glowing orange at the top and bottom.

This vacuum tube module was used in an IBM programmable calculator from 1948. This module, called a "trigger", stored one bit of information. Let's take a closer look and see the module operate.

This module was part of IBM's 604 Electronic Calculating Punch. It read 100 punch cards a minute, performed calculations that were specified by a wiring panel, and punched the results on cards. In the lower left, you can see rows of tube modules with their handles sticking out.