Question

5. Show the machine representation for the following MIPS instruction: bgtz $9, check_val Suppose that the address of the abo

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Address instruction 340 bgtz $9, check-val , when bg tz $9 check-val .. 128 check_val: executing, value of pc L = 340+4 =1344

Add a comment
Know the answer?
Add Answer to:
5. Show the machine representation for the following MIPS instruction: bgtz $9, check_val Suppose that the...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2.17 [51<82.5> Provide the type, assembly language instruction, and binary representation of instruction described by the...

    2.17 [51<82.5> Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields: rt-8 , Just looking at the fields provided, what's the instruction op-0x23, rs-16, const-0x25F0 a. format? R-type_I-typeJ-type b. What's the instruction? In which register is the base address stored? What value will be added to that base address (in decimal): In which register will the result be stored? c. d. e.

  • Suppose the opcode of an MIPS instruction is 0 in decimal, the funct is 100000 in...

    Suppose the opcode of an MIPS instruction is 0 in decimal, the funct is 100000 in binary, and the rest of the machine code is 93120 in hexadecimal (from high-order bit to low-order bit). What is the instruction? When showing the registers, use names (e.g. $t0, $s2) instead of indices (e.g $8, $17).

  • Explain what the following program does. How many times is the bne instruction executed? Assuming that...

    Explain what the following program does. How many times is the bne instruction executed? Assuming that the addi instruction is at address 4000 (decimal), show the addresses of all the instructions. Show the machine language representation of the j L2 instruction (machine language means showing the 32 bits that represent the instruction, but here it is sufficient to type of the instruction, the fields of the instruction and the value of each field decimal).

  • Question 3 (10 points) Convert the following MIPS assembly code into machine language. Write the instruction...

    Question 3 (10 points) Convert the following MIPS assembly code into machine language. Write the instruction in hexadecimal. The opcode for sw 43 (101011). sw St1, -4(St3) Question 4 (10 points) Consider the following MIPS assembly code: addi $s3, $0, 5 addi $s1, S0, 3 addi Ss1, $s1, 2 beq Ss3, Ssl, target addi Ss1, Ss1, 1 target: add Ss3, Ss1, Ssl a. After running the code, what is the value of Ss3? b. If the memory address of the...

  • 5. a. Given the following MIPS instructions with their corresponding addresses, answer the following questions. Address...

    5. a. Given the following MIPS instructions with their corresponding addresses, answer the following questions. Address 1000 Instruction sll St1, $s2, 4 1w $t0, 128(Stl) bne Sto, $15, Exit j Here Start: 1004 Here: 1008 1012 Exit: 1096 i. Write the machine code for each of the above MIPS instructions (5 pts) ii. Find the total number of bits required to store the instructions (3 pts) 5. a. Given the following MIPS instructions with their corresponding addresses, answer the following...

  • Please solve the following 5. Given the following MIPS instructions with their corresponding addresses answer the...

    Please solve the following 5. Given the following MIPS instructions with their corresponding addresses answer the following questions. a. Instruction Start: Address 1000 s1l St1, Ss2, 4 1w $t0, 128(St) bne St0, S t1. Exit Here 004 Here 1008 012 .. Exit: 1096 Write the machine code for cnch of the above MIPS instructions (5 pts) i. i. Find the total number of bits required to store the instructions (3 pts) Scanned by CamScanner 5. Given the following MIPS instructions...

  • Consider a machine which implements an ISA in which every instruction is 32 bits long and...

    Consider a machine which implements an ISA in which every instruction is 32 bits long and has the following format: Where DR = Destination Register, SR = Source Register, and IMMVAL = Immediate Value. The fields DR, SR are represented using the same number of bits. If there are 7 bits for the opcode and 16 registers, A.) How many unique opcodes can be represented? B.) What is the minimum number of bits required for the source register (SR) field?...

  • 1. It is desired to load A[10] into $8, i.e., "lw $8, X($9)". Assume $9 contains...

    1. It is desired to load A[10] into $8, i.e., "lw $8, X($9)". Assume $9 contains the base address of array A. Address Memory content lw $8, X($9) 0x0001 0000 Ox0001 0004 0x0001 0008 Ox0001 000c 0x0001 00101 Ox0001 0014 0x0001 0018 Ox0001 001c 0x0001 00201 0x0001 0024 0x0001 0028 A[O] A[1] $9 contains the based address of array A (i.e., $9 = 0x0001 001c) (a) What is the memory address for A[10]? Answer in hexadecimal number. Hint: Remember that...

  • Given this MIPS machine language code fragment in memory: Address Contents 0x00400024 0x00400028 ...

    Given this MIPS machine language code fragment in memory: Address Contents 0x00400024 0x00400028 0x0040002c 0x00400030 0x00400034 0x00400038 0x0040003c 0x00400040 0x00400044 0x00400048 0x3411000b 0x3c101001 0x2a21000b 0x14200007 0xae080004 0x2231ffff 0x01129020 0x221Offfc 0x2a210002 0x1020fffb Disassemble and show the MIPS instructions For constants in I-format instructions, you may leave them in hexadecimal, or translate them into decimal Do not worry about labels. Show clearly target addresses for all branches and jumps. Given this MIPS machine language code fragment in memory: Address Contents 0x00400024 0x00400028...

  • 1. (15 pts) For the following C statement, what is the corresponding MIPS assembly code? Assume...

    1. (15 pts) For the following C statement, what is the corresponding MIPS assembly code? Assume f, g, h correspond to $80, $s1, and $s2, respectively. f=g+(h-5) 2. (15 pts) For the following pseudo-MIPS assembly instructions, what is the corresponding C code? add f, g, h add f,i, f 3. (30 pts) Provide the instruction type, assembly language instruction, and binary representation of the instruction described by the following MIPS fields: a. op = 0, rs = 18, rt=9, rd...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT