{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw6_solution

# hw6_solution - My UW | UW Search CS/ Engineering Fall 2007...

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

My UW | UW Search Computer Science Home Page > ~markhill Home Contact Info Lecture & Notes Schedule LC-3 Simulator Grading Examinations Homework CS/ECE 252 Introduction to Computer  Engineering Fall 2007 Section 3 Instructor Mark D. Hill TAs Sanghamitra Roy, Eric Hill, Samuel Javner, Natalie Enright Jerger, & Guo URL: http://www.cs.wisc.edu/~markhill/cs252/Fall2007/ Homework 6 Solutions First contact for questions is TA Sam Javner at: [email protected] Problem 1 Problem 5.23 on page 149 of ItCS. x30FF 1110 0010 0000 0001 ; R1 <- PC' + 1 ; R1 <- x3101 x3100 0110 0100 0100 0010 ; R2 <- mem[R1 + 2] ; R2 <- mem[x310 x3101 1111 0000 0010 0101 ; TRAP x25 = HALT x3102 0001 0100 0100 0001 ; x1441 x3103 0001 0100 1000 0010 ; x1482 R2 = x1482 when execution halts Problem 2 Problem 5.31 on page 151 of ItCS. We are given that the first 4 bits of the instruction are 0001, so it must be an ADD in know that the destination register must be R5, so there are two possibilites we can

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

View Full Document
R5 <- R? + R? R5 <- R? + SEXT(imm5) We can rule out the first option, as there are no two registers which added together Note that R0 + xFFF8 = xFFF8 = -8 (decimal).
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern