|
extract the sequence in MIPS
Hi! I've been trying to solve this simple problem using shifting operation in MIPS. However, I'm not really sure if I sure really use an operand like "ori" and "and". This problem kind of confuses me...
Given a 32 bit binary sequence a31a30……..a2a1a0 in a register say s0. I would like
to extract the sequence ai…….aj (with i>j, 0 < i <=32, 0 <= j < 32) and place them in the
least significant bits of another register say t0. Write the sequence of MIPS instructions
that allows one to do that. Also assume that i is available in register s1 and j is s2.
|