subject

Write the 32-bit machine code as 8 hexadecimal digits for the beq, bne, and j instructions in the following code sequence. Assume the addi instruction (label TEST) is located at 0x00C4 0AB0. In the code sequence, when a comment line says "n instructions here" (n is 7 or 18), it means there are n instructions at the place of the comment line. For example, you can imagine that "# 7 instructions here" is replaced with 7 ADD instructions like "ADD $0, $0, $0".
LOOP:
add $s2, $s2, $s3
bne $s1, $s2, ELSE
# 7 instructions here
j TEST
ELSE:
# 18 instructions here
TEST:
addi $s1, $s1, 1
beq $s1, $s0, LOOP
Problem 1. Encoding branch and jump instructions.
Enter eight hexadecimal digits for PC and instruction machine code.
When executing the BNE instruction, PC is Ox[a].
The immediate field in the BNE instruction is [b] in decimal.
The machine code of the BNE instruction is Ox[c].
When executing the J instruction, PC is Ox[d].
The 26-bit partial address field in the J instruction is ob[e] (26 bits).
The machine code of the J instruction is Ox[f].
When executing the BEQ instruction, PC is Ox[g].
The immediate field in the BEQ instruction is [h] in decimal and Ox[i] in (4-digit) hexadecimal.
The machine code of the BEQ instruction is 0x[j].

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 24.06.2019 00:20
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
Answers: 1
You know the right answer?
Write the 32-bit machine code as 8 hexadecimal digits for the beq, bne, and j instructions in the fo...
Questions
question
Computers and Technology, 02.12.2021 19:30
Questions on the website: 13722362