EE357Midterm_Sol

EE357Midterm_Sol - EE 357 Midterm Fall 10 Annavaram Name: _

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

View Full Document Right Arrow Icon
EE 357 Midterm Fall ’10 ● Annavaram Name: ___________________________________________ Lecture:11.00-12.20 Closed Book / 90 minutes Perfect Score: 100 / 100 Score: _______ 1. Short Answer (12 pts.) a. Briefly explain the advantage of using ADDQ.L #1,D0 rather than ADDI.L #1,D0? ADDQ.L doesn‟t use extensions words to store the immediate value and thus takes less memory which means it‟s faster to fetch. b. Which of the following values does a compiler NOT normally put onto the system stack? a. Subroutine arguments / parameters b. Local variables of a subroutine c. Saved register values d. Return value of the subroutine c. In the 16-bit hexadecimal subtraction: 0x3984 – 0xB5A2, does signed and/or unsigned overflow occur (assuming a 16-bit limited result)? a. Signed overflow: Does not occur & Unsigned overflow: Does not occur b. Signed overflow: Does not occur & Unsigned overflow: Occurs c. Signed overflow: Occurs & Unsigned overflow: Does not occur d. Signed overflow: Occurs & Unsigned overflow: Occurs d. Assuming use of the IEEE Single-Precision floating-point representation (1 sign bit, 8 exponent bits using Excess-127, 23 mantissa bits), what is the decimal representation be for the following number: 1 1000 0001 011 0000 0000 0000 0000 0000 a. -1.625 b. -0.8125 e. -5.5 c. -3.25 d. -1.25 e. Calls to subroutines using BSR or JSR save the _____________ ( SR / IR / Return address ) to ____________ ( A7 / the stack / IR ) f. List 2 differences between how subroutines and TRAP‟s get called, are coded, and effect the state of the processor. Traps use the EVT to know where the subroutine is located, subroutines use a displacement or absolute address as part of a BSR/JSR Traps push RA and SR onto the stack while subroutines only push the RA Traps must use an RTE to pop off the RA and SR while subroutines use RTS Traps switch into supervisor mode while subroutines stay in the current mode. g. For each of the following indicate „Yes‟ or „No‟ if it is considered to be part of the Instruction Set Architecture or programmer‟s model of the computer (i.e. something that needs to be defined for the programmer to write SW correctly vs. simply a HW implementation detail)? i.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/03/2011 for the course EE 357 taught by Professor Mayeda during the Spring '08 term at USC.

Page1 / 6

EE357Midterm_Sol - EE 357 Midterm Fall 10 Annavaram Name: _

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

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