kens
7 hours ago
Author here for your 8087 questions. I find adders and ALUs interesting because they are key to the performance of a system and every system implements them differently.
mitthrowaway2
4 hours ago
Do you know about how many transistors are needed to implement the adder (or the FPU as a whole)? And how it scales with the width of the numbers (16 bit, 32 bit, etc)?
I've been curious about transistor counts for floating point units for a while, but it's hard to find information about them.
kens
3 hours ago
I count approximately 2014 transistors (including pull-ups) for the 69-bit adder. Each block of four bits takes approximately 117 transistors.
Aardwolf
5 hours ago
Any idea how much adder designs changed on modern CPUs compared to back then? I mean there's only so much you can optimize in those, I think...
kens
3 hours ago
Even by the time of the Pentium, they had moved to much more complicated adders like Kogge-Stone. I wrote about it here: https://www.righto.com/2025/01/pentium-carry-lookahead-rever...
B1FF_PSUVM
9 minutes ago
Do you have anything on those TRW floating point chips that used to titillate junior engineers in trade mag advertisements before that?
rcxdude
2 hours ago
There's a surprising amount of optimization possible in them. You can improve the latency of them substantially at the cost of a lot more transistors.
B1FF_PSUVM
14 minutes ago
For example, an adder's total delay depends on a carry chain. If you have N 4-bit slices, the last slice has to wait for the carry to propagate through all N-1 previous slices.
But if you duplicate all your slices, you can have the results for both carry = 0 and carry = 1 inputs. Then just switch which one is correct - total time 1 add plus N-1 switches.
Just for double (and change) the hardware. Cheap.
sebgan
6 hours ago
No immediate questions, but happy to have some great weekend reading. A quick pass through finds one of the best and clearest explainers I've seen. Thanks for this and all the materials you produce.
m1333
4 hours ago
> take two clock cycles to complete an addition.
How does the clocking work exactly? The circuit is fed A and B and up down up down clock and then the output appears? How does the consumer (circuit) know when to read the result? Is there a "result is ready" flag? How long does the result stay stable? One full clock cycle? So many questions...
JdeBP
4 hours ago
The adder is not clocked. You can see from the diagrams that there are no clock inputs. The clock cycles comment is more an expression of the length of time that it takes before all of the carry rippling and whatnot settles down.
kens
3 hours ago
In more detail, the microcode engine normally executes one micro-instruction per cycle. For addition, the engine is blocked for one extra cycle to give the result time to percolate through the adder.
There is some complicated timing within a clock cycle with slightly delayed clocks and whatnot, for instance, to precharge the carry lines at the beginning of the operation. The 8087 is mostly synchronous with the clock, but they "cheat" in many places.