341_Homework_3.pdf - CECS 341 Computer Architecture 2018 R....

This preview shows page 1 - 2 out of 2 pages.

The preview shows page 1 - 2 out of 2 pages.
CECS 341Computer Architecture© 2018 R. W. AllisonHomework 3Page 1Homework #3Name_____________________________SID_____________________________Using this sheet as the cover sheet, submit solutions for these problems on separate sheets of paper, clearly showing allyour work. Do not use any MIPS pseudo-instructions unless explicitly instructed to do so.1.Using the MIPS program below (including bugs),determine the instruction formatfor each instruction and thehexadecimal values of each instruction field.addi $v0, $zero, 0# Initialize countloop: lw$v1, 0($a0)# Read next word from sourcesw$v1, 0($a1)# Write to the destinationaddi $a0, $a0,4# bump pointer to next sourceaddi $a1, $a1,4# bump pointer to next destinationbeq$v1, $zero, loop# loop back if word copied !== 02.The following MIPS instruction sequence could be used to implement a new instruction that has two registeroperands.Give the instruction a name and describe what it does. Note that register $t0 is being used as atemporary.srl $s1, $s1, 1#sll $t0, $s0, 31# These 4 instructions accomplishsrl $s0, $s0, 1# “new $s0 $s1”or$s1, $s1, $t0#3.Some computers have explicit instructions to extract an arbitrary field from a 32-bit register and place it in the least

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 2 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
Hernandez
Tags
Assembly Language, Central processing unit, MIPS architecture, R W Allison, Result Ovf

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture