NoName
NoName

Reputation: 10324

Hexadecimal notation for a MIPS program

What I usually do is code using assembly language and then use an assembler to convert it into binary code to run it.

My homework says:

Write the hexadecimal notation for a MIPS machine language program that...

Soo do I write the assembly language version of the program and then turn it into hex?

Upvotes: 0

Views: 1191

Answers (1)

gusbro
gusbro

Reputation: 22585

My advice is to:

  • Write your program in MIPS assembly
  • Either assembly by hand or using a MIPS assembler
  • Then look the machine code generated and write it in hex format (if you have a binary representation of each machine instruction issued by your assembler just group them in 4 bits chunks and convert each chunck to the hexadecimal value, i.e. 0000=0, 0001=1, ..., 1010=A, 1011=B, ..., 1111=F)

Upvotes: 1

Related Questions