math230

Extract register RS from MIPS R-format inst

Oct 11th, 2019
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. // C bitwise lecture examples
  2. #include <stdio.h>
  3. int main()
  4. { int x,y;   //to extract register RS from MIPS r-format
  5.  
  6.   printf("0x%X \n", y = 0x8d080005 << 6);
  7.   printf("0x%X \n", y >> 27);
  8.  
  9.   return 0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment