SoylentNews
SoylentNews is people
https://soylentnews.org/

Title    Reverse-Engineering the Multiplication Algorithm in the Intel 8086 Processor
Date    Friday March 24, @06:33PM
Author    janrinok
Topic   
from the dept.
https://soylentnews.org/article.pl?sid=23/03/23/1253250

owl writes:

http://www.righto.com/2023/03/8086-multiplication-microcode.html

While programmers today take multiplication for granted, most microprocessors in the 1970s could only add and subtract — multiplication required a slow and tedious loop implemented in assembly code. One of the nice features of the Intel 8086 processor (1978) was that it provided machine instructions for multiplication,2 able to multiply 8-bit or 16-bit numbers with a single instruction. Internally, the 8086 still performed a loop, but the loop was implemented in microcode: faster and transparent to the programmer. Even so, multiplication was a slow operation, about 24 to 30 times slower than addition.

In this blog post, I explain the multiplication process inside the 8086, analyze the microcode that it used, and discuss the hardware circuitry that helped it out.3 My analysis is based on reverse-engineering the 8086 from die photos. The die photo below shows the chip under a microscope. I've labeled the key functional blocks; the ones that are important to this post are darker. At the left, the ALU (Arithmetic/Logic Unit) performs the arithmetic operations at the heart of multiplication: addition and shifts. Multiplication also uses a few other hardware features: the X register, the F1 flag, and a loop counter.


Original Submission

Links

  1. "owl" - https://soylentnews.org/~owl/
  2. "Original Submission" - https://soylentnews.org/submit.pl?op=viewsub&subid=58978

© Copyright 2023 - SoylentNews, All Rights Reserved

printed from SoylentNews, Reverse-Engineering the Multiplication Algorithm in the Intel 8086 Processor on 2023-05-26 13:18:33