Computers and Technology

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].

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:30, kivking12
The blank is type of decision-maker who over analyzes information
Answers: 3
image
Computers and Technology, 23.06.2019 09:30, nsjcbdhcb
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
image
Computers and Technology, 23.06.2019 13:50, mrfishyyyy
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
image
Computers and Technology, 24.06.2019 09:00, king514
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
Do you know the correct answer?
Write the 32-bit machine code as 8 hexadecimal digits for the beq, bne, and j instructions in the fo...

Questions in other subjects:

Konu
Social Studies, 26.01.2020 07:31