please i need an explanation for 5 b) and problem 6, step by step how to get giv
ID: 3704330 • Letter: P
Question
please i need an explanation for 5 b) and problem 6, step by step how to get given results...
5. Given the number 0x10280008, what is it when interpreted as: (a) (I point) a binary mumber Answer:?0001 0000 Oo@ ion cooooooo 0000?00 (b) (3 points) a MIPS instruction. Use register names. Answer 6. (2 points) MIPS Jump Given that a MIPS jump instruction located at address Ox00400180 translates to machine code as Ox080000dd, what is the address to which the instruction jumps? I., what address will be placed in Spc to be executed next? d) ? 0000057 Answer:Explanation / Answer
Answer is as follows:
Part 5)
b) We can obtain this by generated Machine code in binary language
i.e.
0001 0000 0010 1000 0000 0000 0000 1000
So we know that in MIPS the opcode is of first 6 bits i.e. 0001 00 that is the opcode of instruct beq.
and next 5 bits are destinitaion register i.e. 00001 i.e. equal to 1 in decimal, For which register is $at according to Register Table
and next 5 bits are source register i.e. 01000 i.e. 8 in decimal, For which register is $to according to Register Table
and other bits 16 bits are set to offset i.e. 0000 0000 0000 1000 i.e. 8 in decimal.
So the complete instruction is beq $at , $t0 , 8.
Part 6.:
We have 0x080000dd
So we have binary equivalent is 0000 1000 0000 0000 0000 0000 1101 1101 from which first 6 biits are opcode for jump instruction and other are target i.e. 00 0000 0000 0000 0000 1101 1101 i.e.
0000DD, So it jumps to target location DD
and PC is calculated as
00 0000 0000 0000 0011 0111 0100 by shifting left target by 2 bits.
So this is equivalent to 0000374 so obtained address is 0x00000374
if there is any query please ask in comments...
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.