Using PC SPIM and converting hex and binary

  • Thread starter TBonety
  • Start date
  • #1
1
0
Hi there, new to the forums, but in need of assistance. I have been looking around and have found some helpful stuff on this site. I found myself visiting this site more then once, so i decided to make an account. Anyways my problem is I have to choose any two mips instructions from this code i wrote and convert them into hex and binary. My problem is im kinda stuck.
I have chosen to do for one of my lines a simple addi function. It is:

addi $t2,$t2,1: to simply add one to my value stored in $t2.

in my pcspim i have some values and am unclear as what they do and how i should approach starting this.

0x214a0001

0x0040004c

My apologies if this is a very "newb" question but if i could just get a pointer on how to start this i would very much appreciate it.
 

Answers and Replies

  • #2
35,229
7,048
Not a bad question. The first number, 0x214a0001, is the machine code for the addi (add immediate) instruction.
The second number is the address in the code segment for that instruction.

BTW, PCSpim is now called QtSpim.
 
Last edited:

Related Threads on Using PC SPIM and converting hex and binary

  • Last Post
Replies
8
Views
3K
Replies
2
Views
3K
  • Last Post
Replies
12
Views
2K
  • Last Post
Replies
12
Views
5K
Replies
10
Views
8K
Replies
1
Views
794
  • Last Post
Replies
10
Views
3K
Replies
1
Views
2K
  • Last Post
Replies
9
Views
4K
Replies
5
Views
376
Top