Question

In: Computer Science

Encode the following instruction (1) identify the instruction format that will be used (2) indicate the...

Encode the following instruction

(1) identify the instruction format that will be used

(2) indicate the values of each of the fields for that format in decimal

(3) convert each of these decimal val- ues to binary

(4) represent the entire instruction as one hexadecimal value

j L2. # where L2 is at the decimal byte address 1,048,608

Solutions

Expert Solution

Greetings!!

1) J instruction format is used.

Opcode(6 bits) Memory address(26 bits)

j L2 or equivalently can be written as j 0x00100020 because the label L2 has an address 1048608(00100020 in hex).

4) Opcode = 000010

Memory address = 00 0000 0100 0000 0000 0000 1000

Machine code = 0000 1000 0000 0100 0000 0000 0000 1000 = 0x08040008

From the given address 00100020(equivalent binary is 0000 00 0000 0100 0000 0000 0000 1000 00) 26 bit jump address(0040008) will be taken and append to make the machine code. The least 2 bits are not used because this is obtained after shifting the address left by 2 bits to align it to the memory word address.

Address calculation during program execution: 26 bits(00 0000 0100 0000 0000 0000 1000) from the machine code is shifted left by 2 bits(or multiplied by 4 to align it to word sized memory) and append to the 4 MSB bits of the current PC. ie 0000 + 0000000100000000000000100000 = 00000000000100000000000000100000 = 00100020 which is the actual jump address.

2) Decimal:

Opcode: 2 Memory address: 262152

3) Binary:

Opcode(6 bits):000010 Memory address(26 bits):00000001000000000000001000

Hope this helps


Related Solutions

Encode the following instruction opcode: 100011 (1) identify the instruction format that will be used (2)...
Encode the following instruction opcode: 100011 (1) identify the instruction format that will be used (2) indicate the values of each of the fields for that format in decimal (3) convert each of these decimal values to binary (4) represent the entire instruction as one hexadecimal value. subu $t3,$v1,$s2
In a computer instruction format, the instruction length is 11 bits and the size of an...
In a computer instruction format, the instruction length is 11 bits and the size of an address field is 4 bits. Is it possible to have 5 two-address instructions 45 one-address instructions 32 zero-address instructions using the specified format? Justify your answer.
In a computer instruction format, the instruction length is 12 bits and the size of an...
In a computer instruction format, the instruction length is 12 bits and the size of an address field is 5 bits. The system architect has already designed three 2-address instructions and thirty one 1-address instructions. How many 0-address instructions can still be possibly accommodated?
Encode 32-bit INTEGER 12 in TLV format?
Encode 32-bit INTEGER 12 in TLV format?
1 The information in this mini case is fictitious and the case is used for instruction...
1 The information in this mini case is fictitious and the case is used for instruction purpose only. Case questions are provided at the bottom. Kensington Plastics In December 2017, Michael Roberts, managing direct or of Kensington Plastics, was considering the purchase of a PlaTech 2 automated injecti on molding machine. The PlaTech 2 would replace older semiautomated machines and would offer improvement in quality and some additional capacity for expansion. Given the size of the pr oposed expenditure of...
Answer the following in essay format. 1) Identify factors That affect personal food choices for obese...
Answer the following in essay format. 1) Identify factors That affect personal food choices for obese people 2) determine the Relationship among nutrition, lifestyle, health, and disease. 3) identify the Source of nutrients and the role they play in the maintenance of good health.
Topics 1. Introduction 2. MIPS instruction set architecture (ISA) Exercise 1 Answer the following questions. (a)...
Topics 1. Introduction 2. MIPS instruction set architecture (ISA) Exercise 1 Answer the following questions. (a) List the five classic components of a computer. (b) Describe the steps that transform a program written in a high-level language such as Java into a representation that is directly executed by a computer processor.
Represent following LEGv8 assembly instruction into machine code (use hexa decimal format). STUR X1, [X1, #8]
Represent following LEGv8 assembly instruction into machine code (use hexa decimal format). STUR X1, [X1, #8]
1. Indicate the status of each of the listed ledger accounts. 2. The following are the...
1. Indicate the status of each of the listed ledger accounts. 2. The following are the steps in the financial accounts compilation, using a spread sheet approach. List the steps in the correct order in which they are to be completed, given the list of ledger accounts at fiscal year-end: (Simply match the letter with the number in the box). a. Prepare adjusted trial balance                                             f. Post transactions b. Prepare an unadjusted trial balance                                    g. Journalize transactions 2....
1.The machine code of LEGv8 instruction SUB X15,X16,X17 in hexadecimal is? 2.The LEGv8 assembly instruction assembled...
1.The machine code of LEGv8 instruction SUB X15,X16,X17 in hexadecimal is? 2.The LEGv8 assembly instruction assembled into the hexadecimal machine code D1001695 is? 3.What does the LEGv8 instruction below do? LSL X12,X12,#8
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT