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

ori $t1,$a2,7

Homework Answers

Answer #1

ori $t1,$a2,7

1)
this is an I-type instruction
OPCODE rs rt immediate

2)
OPCODE = ori = 13
rs = $a2 = 6
rt = $t1 = 9
immediate = 7

3)
13 in binary is 001101
6 in binary is 00110
9 in binary is 01001
7 in binary is 0000000000000111

so, instruction is 00110100110010010000000000000111

4)
Converting 00110100110010010000000000000111 to hexadecimal
0011 => 3
0100 => 4
1100 => C
1001 => 9
0000 => 0
0000 => 0
0000 => 0
0111 => 7
So, in hexadecimal 00110100110010010000000000000111 is 0x34C90007
Instruction in hexadecimal is 0x34C90007


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. subu $t3,$v1,$s2
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...
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...
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...
1. Assuming unsigned binary representation, convert 10110 (B) to decimal. Show work. 2 . Assuming unsigned...
1. Assuming unsigned binary representation, convert 10110 (B) to decimal. Show work. 2 . Assuming unsigned binary representation, convert 12 (D) to binary. Show work. 4. Assuming 9-bit two’s complement representation and let x be binary representation of 94 (D) a. Find x. Show work. b. Show the effect of the ASL operation on x, and then convert the result back to decimal. c. Show the effect of the ASR operation on x, and then convert the result back to...
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:...
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...
1. Given Hexadecimal EDCC16 Detail steps are required. 1) What is the binary representation? 2) What...
1. Given Hexadecimal EDCC16 Detail steps are required. 1) What is the binary representation? 2) What is the negation of EDCC in HEX? 3) Convert it to decimal number if this is a 2s-complement signed binary representation in 16- bit register 4) Convert it to decimal number if this is an unsigned binary representation in 16-bit 2. Suppose we have 3 arrays A, B, and C, array A’s base address is in $S3, B’s base address is in $S4, C’s...
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...
This is a homework assignment for Computer Architecture and some question use MIPS Assembly language. 1.    ...
This is a homework assignment for Computer Architecture and some question use MIPS Assembly language. 1.     In the following MIPS assembly code, translate all the instructions to their corresponding machine code in hexadecimal format. This code is stored in the memory from address 0x1fff0000. Loop: sw $t1, 4($s0)        addi $t1, $t1, -1    sll $t1, $t1, 2        bne $t1, $s5, Exit    addi $s0, $s0, 4          j Loop Exit: … 2.     Find the MIPS...