The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help on an assembly language assignment (MIPS)
The first attached file is my assignment
The second attached file is what I have so far (may not be completely correct)
Â
Exercise 1:a.) I-typeOpcode: 000100 (6-bit operaTon code binary representaTon of the beq instrucTon; if ($rs == $rt) pc += i<< 2)rs: $t2ïƒ $10ïƒ 01010 (5-bit binary representaTon of the Frst source register address)rt: $zeroïƒ $0ïƒ 00000 (5-bit binary representaTon of the second source register address)imm: strlen_end_loopïƒ 0000000000000110 (since the branch target is 6 instrucTons past the beq, weadded a binary 6 to 0000000000000000 to show the o±set of 6).32-bit binary representaTon: 000000 01010 00000 0000000000000110 (added leading zeros to Fll upthe rest of the spots)convert to 8-bit hexadecimal: 0x0140_0006b.) If the code branched backwards to strlen_begin_loop instead, there would be an o±set of -4 insteadof 6.Opcode: 000100 (6-bit operaTon code binary representaTon of the beq instrucTon; if ($s == $t) pc += i<< 2)rs: $t2ïƒ $10ïƒ 01010 (5-bit binary representaTon of the Frst source register address)rt: $zeroïƒ $0ïƒ 00000 (5-bit binary representaTon of the second source register address)imm: strlen_begin_loopïƒ 1111111111111100 (since the branch target is 4 instrucTons behind the beq,we subtracted a binary 4 from 0000000000000000 to show the o±set of -4).32-bit binary representaTon: 000000 01010 00000 1111111111111100 (added leading zeros to Fll upthe rest of the spots)convert to 8-bit hexadecimal: 0x0140_²²²Cc.) J-typeOpcode: 000010 (6-bit operaTon code binary representaTon of the j instrucTon; pc += i << 2)³arget address of strlen_begin_loop: 00000000000000000000000000 – 8 (since the branch target is 8steps behind the j instrucTon)32-bit binary representaTon: 000010 00000000000000000000000000convert to 8-bit hexadecimal: 0x0800_0000
Â
Â
Attachments:
-----------