# hw2_sol - CDA 3101 Assignment 2 Solution Due in class on...

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

CDA 3101 Assignment 2 Solution Due in class on Friday, Sept. 25 Turn hardcopy in class, stapled, with your name (last name followed by first name) and “CDA  3101 Assignment 2” clearly printed on it.  Show your work for all problems to get full credit.  Submit a printout of all your MIPS assembly language code. Assignments submitted after Sept. 25, 12:35 pm but before Sept. 28, 12:35 pm will be considered  one day late.  Note all question numbers are from 4 th  edition of the textbook. 1. (2 points) Problem 2.6.4b from the textbook. Assume A and B are integer arrays. f = A[g/4 – 3];  (Please contact Incheol Shin ( [email protected] ) to get lost point) 2. (4 points) Problem 2.17.1 from the textbook. For each instruction, provide how it can  be implemented using other MIPS basic instructions abs \$t2, \$t3 slt \$t1, \$t3, \$0 bne \$t1, \$0, NEGATION  add \$t2, \$0, \$t3 NEGATION : sub \$t2, \$0, \$t3 sgt \$t1, \$t2, \$t3 slt \$t1, \$t3, \$t2 All of these instructions are either supported by an existing instruction, or  sequence of existing instructions. 3. (4 points) Problem 2.17.4 from the textbook. a. 20 b. 200 4. (6 points) Problem 2.18.2 from the textbook.

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

View Full Document
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