Story Details

  • The Pentium contains a complicated circuit to multiply by three

    Posted: 2025-03-02 18:04:35

    Ken Shirriff's blog post details the surprisingly complex circuitry the Pentium CPU uses for multiplication by three. Instead of simply adding a number to itself twice (A + A + A), the Pentium employs a Booth recoding optimization followed by a Wallace tree of carry-save adders and a final carry-lookahead adder. This approach, while requiring more transistors, allows for faster multiplication compared to repeated addition, particularly with larger numbers. Shirriff reverse-engineered this process by analyzing die photos and tracing the logic gates involved, showcasing the intricate optimizations employed in seemingly simple arithmetic operations within the Pentium.

    Summary of Comments ( 62 )
    https://news.ycombinator.com/item?id=43233143

    Hacker News users discussed the complexity of the Pentium's multiply-by-three circuit, with several expressing surprise at its intricacy. Some questioned the necessity of such a specialized circuit, suggesting simpler alternatives like shifting and adding. Others highlighted the potential performance gains achieved by this dedicated hardware, especially in the context of the Pentium's era. A few commenters delved into the historical context of Booth's multiplication algorithm and its potential relation to the circuit's design. The discussion also touched on the challenges of reverse-engineering hardware and the insights gained from such endeavors. Some users appreciated the detailed analysis presented in the article, while others found the explanation lacking in certain aspects.