Your question refers to:
nor $t3, $t1, $zero # t3 = the 2's complement of t1 - 1
Let me explain.... appying twos complement to a binary number is a way of converting that number between positive and negative. So for example if you have 0111 which is a +7, then you apply twos complement you get 1001 which represents -7. The method used is to flip all the bits, then add 1. So in our example of +7 0111 flipping the bits gives 1000 then adding 1 gives 1001, which is a twos complement representation of -7. If you start with 1001 which is -7 in twos complement, and you want the positive version, you apply the SAME method, flip the bits gives 0110 then add 1 gives 0111. So this same operation applies both ways.
Now, let's look at what NOR does with a small truth table:
t1 |
0 |
or |
nor |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
So NOR gives us a flipped t1, whatever t1 is, NORing with 0 produces the opposite. With this information we know that if we do t1 NOR 0
we get ~t1, and that is basically flipping all the bits in t1.
Now, can you think of a method that involves flipping bits? That's right, twos complement. Oh but twos complement flips them but also adds 1, so if we just want to flip them only, we can do the twos complement and then minus 1 to cancel out that add 1.
So this is why the textbook said this, because NORing with 0 essentially flips t1's bits, and another way of saying that is twos complement minus 1.