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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started