on-internet
← Community

How does a CPU implement an instruction like MUL/MULT?

Stack Overflow ·

In different assembly languages MUL (x86) or MULT (mips) refer to multiplication. It is a black box to the programmer. I am interested in how actually a CPU accomplishes a multiplication regardless of the architecture. Let's say I am the CPU and I have two 16-bit values in my registers. So now I have to implement MUL using some of my bit-fiddling instructions (and, or, xor, not, shl, shr, etc). What shall I do?

Comments

Sign in or sign up to comment and upvote.

No comments yet.