Homework 1b - LSU EE 4720 Homework 1 Due 29 September 2008...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
LSUEE4720 Homework1 Due:29September2008 To answer the first question below see the MIPS32 Architecture manual linked to the course references page. Problem1: The MIPS I bgtz and bltz instructions compare a register to zero, but can’t compare two registers (unless the second one is the zero register). Consider an extension of MIPS I that allowed branch greater than and branch less than instructions to compare two registers, call the new instructions bgt and blt . Explain why the existing bgtz opcode could be used for bgt but why the bltz opcode could not be used for blt . Hint: See bltzal . Problem2: A C function and a part of a MIPS equivalent are shown below. The C function looks at the attributes of a car and decides what to pack in a promotional giveaway to the car buyer. The assembler code corresponds to the C function up until the last line (checking for a sun roof). #define FE_SPORTY 0x1 #define FE_OFF_ROAD 0x2 #define FE_EFFICIENT 0x4 #define FE_SUN_ROOF 0x10000 #define FE_MANUAL_TRANSMISSION 0x20000
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the 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