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 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
How many points do i need before i can send a chat
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
Mathematics, 21.07.2019 15:30
question
Mathematics, 21.07.2019 15:30