3055q1c - Score Name ECE 3055 A Quiz 1 — Spring 2004 ‘...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Score: Name: ECE 3055 A Quiz 1 — Spring 2004 ‘ The following RISC assembly language program is executed on a MIPS processor. Fill in the register values that will be present, after execution of this program. A summary of MIPS instructions is included at the bottom of the page — for anyone unfamiliar with the MIPS instruction set. Prior to execution of the program, memory location 0x0400 contains 0x30552030. Note: 0x indicates hexadecimal and all answers must be in hexadecimal. A MIPS memory word or register contains 32-bits. LW $3, 0x0400 SLL $4, $3, 8 0R $2, $3, $4 AND $3, $4, $3 LUI $5, 0x2030 ORI $5, $5, 63 SUB $6, $4, $3 BNE $3, $6., LABEL1 ADDI $6, $0, —4 LABEL1: SW $6, 0x0400 After execution of the MIPS code sequence above, R2 = 0x 3 6 3 O (in hexadecimal) R3=0xi 0 CO 2 0;; O (in hexadecimal) R4=0x55103 000 (in hexadecimal) R5 =0xlo i O 00 31’:- (in hexadecimal) Memory Location 0x0400 contains: 0x ff 5 Z O l 0 0 t i (in hexadecimal) The MIPS processor contains thirty-two 32-bit registers, $0 through $31. $0 always contains a zero. By default, all arithmetic operations use two's complement arithmetic. MIPS Instruction Meanin ADD Rd, Rs, Rt — Rd = Rs + Rt (R — register (53) ) AND Rd, Rs, Rt — Rd = Rs bitwise logical AND Rt (R — register (S) ) OR] Rd, Rs, [named - Rd = Rs bitwise logical OR Immediate value LUl Rd, Immed - Rd = Immediate value high l6-bits. 0's low 16~bits BEQ Rs, Rt, address - Branch to address, only if Rs equal to Rt LW Rd, address - LOAD - Rd gets contents of memory at address SLL Rd, Rs, count — Shift left logical (use Off”) by count bits SUB Rd, Rs, Rt - Rd 3 Rs - Rt SW Rd, address - STORE - memory at address gets contents of Rd XOR Rd, Rs, Rt - Rd = Rs bitwise logical XOR Rt...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern