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?
Instruction : Follow format MLA style to format the paper and cite sources. - Have three...
Instruction : Follow format MLA style to format the paper and cite sources. - Have three or more sources cited on the works cited page. Question : Write an essay on the following topic: Contribution of technology in education. The essay must have a word of 500 - 700 Excluding title, header and works cited page
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...
True and False 1. The instruction register stores machine code for the instruction being executed. 2....
True and False 1. The instruction register stores machine code for the instruction being executed. 2. Before a digital computer may execute an instruction, the instruction code must be fetched from memory. 3. A pointer is a binary code for data in the arithmetic logic unit. 4. Von Neumann computer architecture stores data and instruction codes in the same memory. 5. Complex instruction set computers have instructions with greater speed than those in reduced instruction set computers.
1.Describe a Current State problem (hypothetical or actual) in bullet format. 2.   Identify the causes that are...
1.Describe a Current State problem (hypothetical or actual) in bullet format. 2.   Identify the causes that are leading to the current state problem. 3.   Select 1 cause and conduct a 5 why(or less) exercise to get down to the Root Cause 4.   Once the Root Cause is identified, identify Countermeasures that specifically address the Root Cause. 5. Future State is what the outcome/process will look like when the Countermeasures are implemented and successful. thank you.
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.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT