Question: 3 . 1 Prime Number Detector In task 2 . 1 , we saw how to perform multiplication via repeated add instructions, however, this becomes

3.1 Prime Number Detector
In task 2.1, we saw how to perform multiplication via repeated add instructions, however, this becomes very slow for performing multiplications on large numbers. As such, the MIPS ISA supports special instructions for both multiplication and division, named mult and div.
These are special instructions, as they use special hardware to perform the operations, and the results of these instructions are always stored in the HI and LO registers. To access these HI and LO registers, two more special instructions are used: mfhi, to move from the HI register into a GP register, and mfl o, to move from the LO register.
They can be used as follows:
3 . 1 Prime Number Detector In task 2 . 1 , we

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!