EE352Midterm_sol - EE 352 Midterm Spring '08 Redekopp Name:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
EE 352 Midterm Spring ’0 8 ● Redekopp Name: ___ Solutions _______________________________ Closed Book / 80 minutes Score: ________ 1. Short Answer (20 pts.) a. Which of the following can be used to accurately compare the performance of the same C program running on two totally different processors (Circle all that apply). Clock Rate Instructions per Second Total execution time b. True / False : A short (half) variable can be stored at starting address 0x10015CA6. c. In the stack frame organization taught in lecture, the ( caller / calling) subroutine will allocate space for the ( maximum / minimum ) number of arguments of any subroutine called by the caller routine. d. Under MIPS conventions which of the following registers are callee-saved (preserved) registers? (Circle all that apply) i. Temporaries ($t0-$t9) ii. $ra iii. Argument registers ($a0-$a3) iv. Saved Registers ($s0-$s7) e. The instruction beq $zero,$0,L1 ‟ instruction will ( always / possibly / never ) branch to the location given by L1 and ( will / will not ) save the address of the instruction immediately after the „beq‟ in the $ra register. f. A jump / branch instruction is located at address 0x00400008. The target of that jump / branch instruction (where it wants to go to) is located at 0xF0000010. Which of the following instructions can be used to jump / branch to that location. (Circle all that apply). b xx (branch instruc.) jmp jr g. In IEEE 754 floating point performing an arithmetic operation on an NaN yields ( overflow /underflow / another NaN ). h. Given that $t1 = 0xfedcba98 and that $s0 = 0x1004800c, the instruction: sb $t1,0xfff8($s0) ‟ will store the data ( 0xfe / 0x98 ) at the address: 0x 10048004 ___________________. i. When an exception occurs, the processor will store the address of the offending instruction in the ( Cause / EPC ) register and call an exception handler. The exception handler must be terminated with the ( jr $ra / eret ) instruction.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2. Data Representation (5 pts.) Each C declaration of the variable x is initialized to a value in decimal. Show that value represented in hex using the appropriate size indicated by the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/21/2008 for the course EE 352 taught by Professor Redekopp during the Spring '08 term at USC.

Page1 / 6

EE352Midterm_sol - EE 352 Midterm Spring '08 Redekopp Name:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online