Machine Language - Assembly Disassembly 1. Show the binary representation of the
ID: 3843231 • Letter: M
Question
Machine Language - Assembly Disassembly
1. Show the binary representation of the following instructions (5 points each)
a. add $23, $16, $23
b. sub $16, $16, $17
c. lw $16, 4($29)
d. sw $17, 16($29)
2. Assemble the following MIPS Machine Instructions, Final answer should be in hexadecimal. Don’t worry about addresses (15 points):
add $23, $13, $14
add $24, $17, $23
addi $17, $17, 1
addi $13, $13, 1
ori $13, $13, $0
3. Disassemble the following MIPS Machine Code. Registers can be left as numbers. Do not worry about numbers. (15 points)
0x3411000b
0x3c101001
0x2231ffff
0x01129020
0x2210fffc
Explanation / Answer
Hi, for this question it is necessary to know the following knowledge: The instruction codes representation, that is what add, ori instruction translates to, and basic binary to hex conversion.
1.
a) 00000010000101111011100000100000
add = 100000, $16 = s0 = 10000, $23 = s7 = 10111
b) 00000010000100011000000000100010
sub = 100010
c) 10001111101100000000000100000000
lw = 100011, sp = 11101,s0 = 10000, offset = 0000000100000000
d) 10101111101100010000000000000000
sw = 101011, sp = 11101, s1 = 10001, offset = 0000000000000000
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.