Show the hex representation of MIPS instructionsby shieldcy Tags: instructions, mips, representation 

#1
May2211, 06:03 PM

P: 5

Hey all
1. The problem statement, all variables and given/known data Here i want to translate them and show the hex representation of these instructions: 1)add $t0, $t0, $zero 2)lw $t2, 16($s3) 2. Relevant equations 3. The attempt at a solution eg. 2) lw  $s3  $t2  16 ITYPE then translate the assembly code: 35  19  10  16 The solution is 0x8E6A0010 But i 've no idea how the answer has been reached... Any help? Thank's a lot 



#2
May2211, 06:27 PM

P: 90

What is the context of this question? Should you be able to answer it on a test or is it a homework problem meant to familiarize you with your assembler? I would write the code, compile it, and view the answer by stepping through the code.




#3
May2211, 06:46 PM

P: 5

It's an exam type question but MIPS assembly language table (http://en.wikipedia.org/wiki/MIPS_ar...embly_language) will be provided in exams




#4
May2311, 03:00 AM

PF Gold
P: 1,054

Show the hex representation of MIPS instructions
Looks like you have decomposed the assembly instruction correctly:
35_{10} = instruction 19_{10} = s 10_{10} = t 16_{10} = C Convert the base10 values that you obtained into binary. Then group your binary results into the following Itype format: [iiiiiiss] [sssttttt] [CCCCCCCC] [CCCCCCCC] (use 6bits of your instruction result, 5bits of s, 5 of t, 16 bits of C, zeropadding as needed) Then convert each 8bit group to its hexadecimal equivalent. 



#5
May2311, 10:10 AM

P: 5

thank you so much! cheers ;)




#6
May2311, 11:13 AM

P: 5

Could you please show me the way to convert hex value 0x8E6A0010 to decimal?




#7
May2311, 11:48 AM

P: 90

0*16^0 + 1*16^1 + 0*16^2 + ... + 8*16^7 



#8
May2311, 11:54 AM

P: 5

Oo yeah... thank's man ;)




#9
May2311, 12:24 PM

P: 90

e.g. 10110 base 2 = 0*2^0 + 1*2^1 + 1*2^2 + 0*2^3 + 1*2^4 = 2 + 4 + 16 = 22 


Register to reply 
Related Discussions  
Anyone familiar with MIPS floating point instructions?  Programming & Computer Science  2  
Executing instructions in the LC3  Engineering, Comp Sci, & Technology Homework  0  
How many instructions are there ?  Computing & Technology  83  
Latex instructions  Forum Feedback & Announcements  4  
Instructions for TI83 for probabilities  Set Theory, Logic, Probability, Statistics  2 