0

Is there a way to reverse bits in mips?

For example turning 00110101 into 10101100

I have tried rotating it a certain amount but that does not seem to result in the reverse of the bits. Any help would be appreciated!

  • Welcome to Stack Overflow! are your bits represented by a number or string? – Abhinav Singhal Jun 24 '21 at 22:32
  • 1
    Of course, MIPS can do anything; you just need an algorithm. Think about doing it in C first, test it to make sure it works, and then just translate each operation rather directly into MIPS. – Erik Eidt Jun 24 '21 at 22:37
  • I think your question is already answered here https://stackoverflow.com/questions/33675141/reversing-the-bits-of-a-number-in-mips-assembly – JohnP Jun 24 '21 at 22:44

0 Answers0