Machine Code for the given MIPS Code

pdf

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

CSE/EEE 230 – Assignment 2
Important: This is an individual assignment. Please do not collaborate.
Make sure to follow the academic integrity policies. Using work done by someone else will be
considered a violation of the academic integrity and will result in a report to the Dean’s office.
Your work should not match with anything found online.
Copying any part of this assignment, and providing them to another person or posting them on
the Internet without a permission of the instructor will be a violation of its copyright.
http://www.asu.edu/copyright/
No late submissions will be accepted.
Show all the steps including how you arrived at your solution to receive full credit.
There are 2 questions. First question will be graded for 20 points and scaled down to 2 points,
while the second question will be graded for 10 points and scaled down to 1 point.
Question 1: Write the Machine Code for the given MIPS Code that starts at address 0x80000. For
each instruction answer the following.
(a) Instruction Format
(b) Binary Machine Code
(c) Hex Machine Code
Main:
ble $s0, $0, End
sub $a0, $s0, $0
Jal Func
J End
Func:
add $v0, $0, $0
Loop:
addi $v0, $v0, 1
srl $a0, $a0, 1
bgt $a0, $0, Loop
Ret:
End:
jr $ra
Question 2: Write the MIPS code for the given Hexadecimal Machine Code that starts at memory
address 0x40000.
Line1: 0x0080082A
Line2: 0x14200002
Line3: 0x2084FFFF
Line4: 0x08010005
Line5: 0x20840001
Line6: 0x1480FFFA
Line7: 0x03E00008
Line8: 0x0C010000

Still stressed with your coursework?
Get quality coursework help from an expert!