Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Assembly (http://www.programmingforums.org/forum20.html)
-   -   extract the sequence in MIPS (http://www.programmingforums.org/showthread.php?t=12645)

goblin_rocksled Feb 22nd, 2007 9:09 PM

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.


All times are GMT -5. The time now is 1:43 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC