{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sol ch 2

# sol ch 2 - Solutions of Homework 1 2.2 Convert 7fff fffahex...

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

Solutions of Homework 1 2.2 Convert 7fff fffa hex to binary and decimal. 7fff fffa hex = 0111 1111 1111 1111 1111 1111 1111 1010 two = 2,147,483,642 ten 2.3 Convert from binary to hexadecimal. 1100 1010 1111 1110 1111 1010 1100 1110 two = cafe face hex 2.4 Why doesn’t MIPS have a subtract immediate instruction? Since MIPS includes add immediate and since immediates can be positive or negative, subtract immediate would be redundant. 2.5 Consider the following code used to implement the instruction sllv \$s0, \$s1, \$s2 which uses the least significant 5 bits of the value in register \$s2 to specify the amount register \$s1 should be shifted left: .data mask: .word 0xfffff83f .text start: lw \$t0, mask lw \$s0, shifter and \$s0,\$s0,\$t0 andi \$s2,\$s2,0x1f sll \$s2,\$s2,6 or \$s0,\$s0,\$s2 sw \$s0, shifter 1

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