views:

204

answers:

2

I'm reading about division in MIPS and I've found that div

Divides $s by $t and stores the quotient in $LO and the remainder in $HI

http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html

And Wikipedia says

HI and LO are used to access the multiplier/divider results, accessed by the mfhi (move from high) and mflo commands.

http://en.wikipedia.org/wiki/MIPS_architecture

Are HI and LO registers? What number registers are they?

+2  A: 

HI and LO are not numbered registers, IIRC. They are only used to store the results of operations that would not fit in a single register (e.g. multiplying two 32-bit integers could result in a 64 bit integer, so the overflow goes in HI).

edit: according to this class description, they are indeed special registers, so they are not numbered, and only accessible using special commands.

Sean Nyman
+1 this is still a good answer
Matt
+2  A: 

These are special registers used to store result of multiplication and division. They are not directly addressable. Their contents are accessed with special instruction mfhi and mflo

They are present in the Multiply Unit and are 32-bits each. More info here.

codaddict