 This time we're going to look at floating point arithmetic in the MIPS assembly language. It's similar to doing integer arithmetic in that we've still got add, subtract, multiply, and divide. We won't have any way to do a remainder operation because there isn't any remainder with floating point division anyway. We have two options for the precision of our floating point values, single precision and double precision. Single precision has 32 bits, double precision has 64 bits. The MIPS implementation can't actually do these instructions on the main CPU. It actually has a separate coprocessor just to do floating point arithmetic. This is coprocessor number one. And we've got a series of instructions, and each instruction allows us to also choose the precision. So we have the format that we have the instruction we'd like to do, followed by a period, and then the precision. So, for example, we get things like add.s, add.d, and we can mix them and match those as we need. As you'd expect with, say, an add instruction, we have two source registers and a destination register. And they're all going to come from registers that are on the coprocessor, not on the main CPU. So we have 32 floating point registers that are dedicated to our floating point computation. The mnemonics for these are f0 through f31, and you can use any of them that you'd like for single precision operations. If you want to use double precision operations, then because all of these are 32-bit registers, we're going to need to pull in two registers for each of our sources and our destination. The way we do this is by using the even numbered register that you mentioned in the instruction, followed by the odd numbered register that's right after it. So if I have an add double instruction that wants to store to say register f0, it's going to store to register f0 and register f1. If I wanted it to pull in from register... If I told it that the first source would be register f8, it would pull in the data from f8 and f9. That way it gets a full 64 bits to use in its computation. But sometimes we also need to be able to pass data between the coprocessor and the main CPU. We have a couple of different instructions to do this with. We have a move to coprocessor 1, mtc1, and a move from coprocessor 1, which is mfc1. These will allow us to transfer 32 bits at a time. So if we're going to transfer a double, then we're going to have to make two transfer operations either way. But this will provide the majority of the things that we need to actually implement floating point arithmetic.