0
votes

Say I had two significands stored in t2 and t3, and I wished to multiply them. I'd do so with:

 mult $t2, $t3

I'm multiplying two 24 bit numbers, so result is going to be 48 bits in total stored in the HI and LO registers. Now what I need to do is shift down the bits in the HI and LO registers so that a leading 1 present in bit position 48 is going to be shifted to bit position 24.

I'd appreciate any tips on how to deal with this problem ... I don't know how to code such a shift, especially since I have two different registers i'm dealing with.

1
Note that the leading 1 bit will not be in a fixed position. As for doing a shift across registers that's just some simple bit twiddling. You shift the low word right, then the high word left so that you properly align for transferring into the low word, which you do with bitwise or. - Jester

1 Answers

0
votes

Reposting as an answer Jester's comment:

Note that the leading 1 bit will not be in a fixed position. As for doing a shift across registers that's just some simple bit twiddling. You shift the low word right, then the high word left so that you properly align for transferring into the low word, which you do with bitwise or. – Jester Apr 4 at 17:43