Question: In particular please explain it in binary. What are the offsets for the branch instructions and how would it be represented in binary? Assignment: 1.
In particular please explain it in binary. What are the offsets for the branch instructions and how would it be represented in binary?
Assignment:
1. Consider the following program:
L1: lw $t5,1648($s2)
L2: addi $t5,$s3,-8
L3: beq $t5,$t6,L5
L4: bne $t5,$t6,L1 L5:
j L1
Assuming the above program is loaded at 0x12345678, determine the machine code. Please state your answer in binary. Make sure to state how many bits each field is after all, a 5-bit 0 is not the same as a 6-bit 0.
Please clearly explain it thank you.
Note : Labels are equivalent to immediates corresponding to the address that the OS will decide for them. For example, if the OS decides to start the program at 0xABCD1234, mask is the 32-bit immediate 0xABCD1234.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
