FIGHelp3 - PROBLEM 1 Each part is worth 2 points Part a Suppose the condition codes are NZP = 010 before the following instruction is executed ST

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

View Full Document Right Arrow Icon
PROBLEM 1 – Each part is worth 2 points Part a) Suppose the condition codes are NZP = 010 before the following instruction is executed. ST R1, #3 What are the condition codes after the execution of the instruction? N= Z= P= Part b) What does the following piece of code do? (Express your answer in not more than 15 words). NOT R1, R1 ADD R1, R1, #1 ADD R2, R2, R1 Answer: Part c) What does the following piece of code store in R0? Express the value in R0 in terms of R1, example R0 = 2 x R1 + 5 (Express your answer in not more than 15 words). ADD R0, R1, R1 ADD R0, R0, R0 ADD R0, R0, R1 Answer: Part d) Assume the variable X has value x1212. What is the result if X is left shifted by 3 bits (express your answer in hexadecimal)? Answer: Part e) Assume the variable Y has value x2121 and that variable Z has value xFAFA. What is the result of Y XOR Z (express your answer in hexadecimal)? Answer:
Background image of page 1

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

View Full DocumentRight Arrow Icon
PROBLEM 2 - 20 points Below is the state of the registers in the LC3 before and after the instruction at location x3000 is executed. Note: You do not know the contents of any other memory location. Fill in the instruction in machine language.
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 03/22/2008 for the course EE 302 taught by Professor Mccann during the Fall '06 term at University of Texas at Austin.

Page1 / 5

FIGHelp3 - PROBLEM 1 Each part is worth 2 points Part a Suppose the condition codes are NZP = 010 before the following instruction is executed ST

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