 In this example, we're going to be translating these two instructions from assembly language into machine language. When you're actually doing this, you're probably going to want to have a couple of tables handy to tell you what your opcodes and function codes are, as well as what the register numbers are. But for these examples, we can just tell you what those numbers are. I will start with the add instruction, and the opcode for an add instruction is 0. The RS field corresponds to the first source register. In this case, the first source register is T1, the second source register is $T2, and then the destination is registered T0. We don't have a shift instruction, so we won't have anything in the shift amount. And the function code for an add instruction is 20 in hexadecimal. So in machine language, we'll need to convert all of these into binary bits. Our opcode contains six bits, so I will write in six bits of zeros. Our first source register is T1, which is register 9. So I will write in 9 using five bits. Our second source register is T2, which is register 10. So I will write in 10 in binary. The destination register is T0, which is register number 8. Then we have five bits for our shift amount, which is zero. And then we have six bits for our function code. We will often be asked to convert your machine language instruction into hexadecimal because it makes it easier to read. And if you ever actually see these instructions in the machine, they'll normally be represented in hexadecimal. So we'll go ahead and convert our machine language instruction into a hexadecimal number. And we'll do that just by looking for blocks of four bits. So this is how the add T0, T1, T2 instruction would look if you saw it in an actual machine. We'll do the same process again for our subtract instruction. The opcode will also be zero. This time our first source register is S1. This is register number 17. Our second source register is S2. The destination register is S0. It's not a shift instruction. And the function code for subtract instruction is 22. Now we'll go ahead and convert all of these values into binary. And then we'll go ahead and convert them into hexadecimal again. So I have six bits of zeros for my opcode. S1 is register 17. S2 is register 18. S0 is register 16. S0 is zero. 22 is 1, 0, 0, 0, 1, 0. So you will frequently see your function codes and opcodes represented in hexadecimal. But often register numbers will be given in decimal. If your tables have been provided to you in that way, make sure you remember which ones are which and not get them confused. Grouping blocks of bits, I get 0, 2, 3, 2, 8, 0, 2, 2. So this is what our subtract instruction will look like in our machine.