Question

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.

subu $t3,$v1,$s2

Homework Answers

Answer #1
subu $t3,$v1,$s2

1)
subu $t3,$v1,$s2
This is an R-type instruction

2)
opcode  ->  000000
rs      ->  $v1 ->  3
rt      ->  $s2 ->  18
rd      ->  $t3 ->  11
shamt/shift ->  0
funct   ->  SUBU    ->  19

3)
3 in binary is 00011
18 in binary is 10010
11 in binary is 01011
19 in binary is 100011
so, instruction in binary is 000000    00011  10010  01011  00000  100011
Instruction in binary:  00000000011100100101100000100011

4)
Converting 00000000011100100101100000100011 to hexadecimal
0000 => 0
0000 => 0
0111 => 7
0010 => 2
0101 => 5
1000 => 8
0010 => 2
0011 => 3
So, in hexadecimal 00000000011100100101100000100011 is 0x00725823
Instruction in hexadecimal: 0x00725823
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
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 ori $t1,$a2,7
Question 1. Answer the following questions on MIPS Instruction Set. a) Show the minimal sequence of...
Question 1. Answer the following questions on MIPS Instruction Set. a) Show the minimal sequence of MIPS instruction for the following pseudocode segment: A[3] = A[10] + B; Assume that B corresponds to register $t3 and the array A has a base address of 1000C41016 which is required to be loaded to register $t0 in your code. Provide comments for each line of your MIPS instruction. b) Assume that Loop starts at memory location 0xC010. Provide a) instruction format of...
1a. Using the MIPS program below (with bugs intact), determine the instruction format for each instruction...
1a. Using the MIPS program below (with bugs intact), determine the instruction format for each instruction and write the decimal values of each instruction field. addi $v0, $zero, 0 loop: lw $v1, 0($a0) sw $v1, 0($a1) sll $a0, $a0, 2 add $a1, $a1, $a0 beq $v1, $zero, loop 1b. Translate the following C/Java code to MIPS assembly code. Assume that the values of a, i, and j are in registers $s0, $t0, and $t1, respectively. Assume that register $s2 holds...
2 Convert each of the following octal numbers to 10-bit binary, hexadecimal, and decimal. Show your...
2 Convert each of the following octal numbers to 10-bit binary, hexadecimal, and decimal. Show your work. (a) 368 (b) 7568 3 Convert the following binary values into Decimal, Octal and hexadecimal. Show your work. (a) 111010101011112 (b) 1010111011001102 (c) 1011101010001112 (d) 1111101011102 4 Convert the following hexadecimal numbers to 16-bit binary and decimal numbers. Show your work. (a) FE9816 (b) FCAD16 (c) B00C16 (d) FEDF16 5 Perform the addition on the following unsigned binary numbers. Indicate whether or not...
EE 263 Homework Assignment 1    Perform the following conversions: Convert 51 (decimal) to binary and...
EE 263 Homework Assignment 1    Perform the following conversions: Convert 51 (decimal) to binary and to hex Convert 0xD1 (hexadecimal) to binary and to decimal Convert 0b11001001 (binary) to hex and to decimal Find the 2’s complement of the following 4-bit numbers 1101 0101 Perform the following 4-bit unsigned operations. For each, indicate the 4-bit result and the carry bit, and indicate if the answer is correct or not. 5 + 8 2 + 12 13 – 7 4...
Find the internal representation of the following decimal number in the Single Precision Floating Point format...
Find the internal representation of the following decimal number in the Single Precision Floating Point format of the value: -17.6 Non-terminating fractions should be carried out 6 places. You will show the different steps involved in this transformation by filling out the fields below. The value 17 in binary is ___ 2 (no leading or trailing zeroes). The value .6 in binary is ____ 2 (complete to 6 places) Normalized fraction: 1.____ 2 x 2Exponent. Exponent=_____. Biased Exponent in Binary:...
7. Encode the following message using the ASCII encoding scheme:  I love CS! 1. 0100 0011 0101...
7. Encode the following message using the ASCII encoding scheme:  I love CS! 1. 0100 0011 0101 0011 0010 0000 0111 0010 0111 0101 0110 1100 0110 0101 0111 0011 0010 0001 2. 0100 0011 0101 0011 0010 0000 0111 0010 0111 0101 0111 1100 0110 0101 0111 0011 0010 0001 3. 0100 1001 0010 0000 0110 1100 0110 1111 0111 0110 0110 0101 0010 0000 0100 0011 0101 0011 0010 0001 4. 0100 0011 0101 0011 0010 0000 0111 0010...
16.  Convert the following decimal notation to an equivalent binary notation: 2.75 17. If the following uses...
16.  Convert the following decimal notation to an equivalent binary notation: 2.75 17. If the following uses the floating-point format defined in Figure 1.25 of the textbook, what is the decimal notation for this number: 01100101 18. Encode the following decimal value using the 8-bit floating-point format of Figure 1.25: 7/8 HINT: Be sure to use the normalized form. Note: Answer should be in the format n nnn nnnn 19. Encode the following decimal value using the 8 bit floating point...
Example the Pep/9 system contains the following four hexadecimal values register A: 25B6 register X: AE20...
Example the Pep/9 system contains the following four hexadecimal values register A: 25B6 register X: AE20 Mem[091D]: 0FF0 Mem[0A71]: 301D If these are the values before each of the following instructions executes, indicate which of these values is changed when each statement is executed, and show the new value. If a register or a memory location shown above is unchanged by the instruction, don't show its contents; only show the item that changed and what the new 16-bit value of...
Pick a company (Coffee Shop) do the following: 1. Describe the business 2. Identify at least...
Pick a company (Coffee Shop) do the following: 1. Describe the business 2. Identify at least 4 data marts, describe the analytic or business functions they would support, and identify what data they will need, and where this data will come from. Include at least 10 fields for each data mart. No data mart should pull data from only one source system.