No. const
is a 16-bit immediate operand that is
zero-extended to a 32-bit integer when it is copied to $d
.
So it can't be negative.
Here is an interesting bit manipulation problem. Say that we wish to negate the representation of an integer that has been loaded into a register. Later in these pages there is an easy way to negate an integer, but for now let us use the instructions you already have seen.
Recall that a two's complement integer is made negative by reflecting the bits then adding one.
Say
that register $8
has been loaded with +82
by using:
ori $8,$0,82
What instructions can do the following:
$8
$8