Question: Nm [5 parts) Given: Consider the following MIPS program and the memory addresses and contents for the code. Instruction Address(decimal) Assembled Instruction No. 1 label:

 Nm [5 parts) Given: Consider the following MIPS program and the
memory addresses and contents for the code. Instruction Address(decimal) Assembled Instruction No.
1 label: add $t0, $zero, $to 40000 2 addi $sp,$sp, -8 3
sw $ra, 4($sp) 4 sw $a0, 0($sp) 5 siti Sto, $a0, 1

Nm [5 parts) Given: Consider the following MIPS program and the memory addresses and contents for the code. Instruction Address(decimal) Assembled Instruction No. 1 label: add $t0, $zero, $to 40000 2 addi $sp,$sp, -8 3 sw $ra, 4($sp) 4 sw $a0, 0($sp) 5 siti Sto, $a0, 1 6 beg $a0, $zero, EXIT 7 addi $v0, $zero, 1 8 0 2 1 8 addi$sp,$sp, 8 jr Sra 10 EXIT: addi Sa0, $a0, -1 11 jal label 9 Part 1: If the code starts at address 40000 as shown above: The address of instruction no. 7 is: a) 40006 b) 40012 c) 40024 d) 40048 e) 40096 f) 40192 B) 40384 h) 40768 Answer 1: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 2: Name the addressing modes used in the following instructions: No.5 (siti): No. 6 (beg): No. 9(r): a) siti: PC-relative, beg: immediate .jr: Pseudo-Direct b) siti: immediate, beq: Pseudo-Direct, jr: Pseudo-Direct c) siti immediate, beg: PC-relative.jr: PC-relative d) siti: base, beq: immediate , jr: Pseudo-Direct e) slti: register, beq: base, jr: Pseudo-Direct f) siti: immediate, beg: Pseudo-Direct, jr: PC-relative g) siti: immediate, beq: base.jr: PC-relative h) siti: immediate, beq: PC-relative , jr: Pseudo-Direct Answer 2: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 3: For the MIPS program above, what is the machine code representation of beg Sao, Szero, EXIT a) Ox14800003 b) Ox14800002 b) Ox14800002 c) Ox1480000C d) Ox10800003 e) Ox1080000C f) Ox1040000C Answer 3: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 4: For the MIPS program above, what is the machine code representation of: jal label a) Ox0c002710 b) OXO8002710 c) OXO8040000 d) OxOc010000 e) OxOc040000 f) OxOcO00000 Answer 4: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 5: What is the MIPS assembly language statement corresponding to this machine language? ad2804bOhex a) sw $t0, 1200{$t1) b) sw $51.1200/550) language? ad2804bOhex a) sw $t0,1200($t1) b) sw $$1,1200($50) c) Ibu $50,24($51) d) sb $s0,1200($51) e) ori $t0,t1, 1200 f) addi t0,t1, 1200 g) andi so, s1, 1200 h) Ihu $t0,1200($t1) Answer 5: (Note: Indicate ONLY the LETTER corresponding to your choice) Nm [5 parts) Given: Consider the following MIPS program and the memory addresses and contents for the code. Instruction Address(decimal) Assembled Instruction No. 1 label: add $t0, $zero, $to 40000 2 addi $sp,$sp, -8 3 sw $ra, 4($sp) 4 sw $a0, 0($sp) 5 siti Sto, $a0, 1 6 beg $a0, $zero, EXIT 7 addi $v0, $zero, 1 8 0 2 1 8 addi$sp,$sp, 8 jr Sra 10 EXIT: addi Sa0, $a0, -1 11 jal label 9 Part 1: If the code starts at address 40000 as shown above: The address of instruction no. 7 is: a) 40006 b) 40012 c) 40024 d) 40048 e) 40096 f) 40192 B) 40384 h) 40768 Answer 1: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 2: Name the addressing modes used in the following instructions: No.5 (siti): No. 6 (beg): No. 9(r): a) siti: PC-relative, beg: immediate .jr: Pseudo-Direct b) siti: immediate, beq: Pseudo-Direct, jr: Pseudo-Direct c) siti immediate, beg: PC-relative.jr: PC-relative d) siti: base, beq: immediate , jr: Pseudo-Direct e) slti: register, beq: base, jr: Pseudo-Direct f) siti: immediate, beg: Pseudo-Direct, jr: PC-relative g) siti: immediate, beq: base.jr: PC-relative h) siti: immediate, beq: PC-relative , jr: Pseudo-Direct Answer 2: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 3: For the MIPS program above, what is the machine code representation of beg Sao, Szero, EXIT a) Ox14800003 b) Ox14800002 b) Ox14800002 c) Ox1480000C d) Ox10800003 e) Ox1080000C f) Ox1040000C Answer 3: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 4: For the MIPS program above, what is the machine code representation of: jal label a) Ox0c002710 b) OXO8002710 c) OXO8040000 d) OxOc010000 e) OxOc040000 f) OxOcO00000 Answer 4: (Note: Indicate ONLY the LETTER corresponding to your choice) Part 5: What is the MIPS assembly language statement corresponding to this machine language? ad2804bOhex a) sw $t0, 1200{$t1) b) sw $51.1200/550) language? ad2804bOhex a) sw $t0,1200($t1) b) sw $$1,1200($50) c) Ibu $50,24($51) d) sb $s0,1200($51) e) ori $t0,t1, 1200 f) addi t0,t1, 1200 g) andi so, s1, 1200 h) Ihu $t0,1200($t1) Answer 5: (Note: Indicate ONLY the LETTER corresponding to your choice)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!