Assume $t2=0x55555550
, then executing the following instruction:
andi $t2, $t2, -1
$t2 becomes
MIPS Reference Sheet
From this reference sheet, for the andi instruction, it clearly says that sign extension done on the immediate is zero extension. It is similar for the ori instruction as well. For the sequence of operations you are using, this is exactly what MIPS is supposed to do. For doing what you intend to do, you should store 0xFFFFFFFF in some other register, and use "and" operation.