midexamfall05

# midexamfall05 - instruction slt \$t3 \$t1 \$t2 sltu \$t4 \$t1...

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

Computer Organization CDA-3103 Mid-Term Exam Fall 2006 Be lucid and neat. Justify all your answers. 75 mins. Closed book, Closed notes, No calculator. Name:

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

View Full Document
Q1 (20 pts.) (5pts) Complete the following truth table for a one-bit full adder. (10 pts) Give the most simplified expressions for S and Co in sum-of-products form. (5pts) Implement them using discrete logic. A B Ci S Co 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
Q2 (20 pts.) a. (10 pts) What are the decimal values of the following binary numbers if they are unsigned integers? What if they are signed integers? 1111 1111 1111 1111 1111 1111 0101 0111 0000 0000 0000 0000 0000 0000 0101 0111 (no need to simplify) b. (10 pts) Assume that the registers \$t1 , and \$t2 contain the first and the second binary numbers, respectively. What are the values of registers \$t3 and \$t4 after these two instructions are being executed? Explain and comment each

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

View Full Document

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.

Unformatted text preview: instruction. slt \$t3, \$t1, \$t2 # sltu \$t4, \$t1, \$t2 # . Q3. (20 pts.) Answer both parts. a. (10 pts.) Convert 11011001011000000000000000000000 (IEEE-754 single precision floating point) to base 10. b. (10 pts.) Convert 20 1-(base 10) to IEEE-754 single precision floating point format. Q4. (20 pts.) Convert the following fragment of C code to MIPS instructions. Comment all lines, and explain how your code works. while ( a < b ) do { a = a + 1; b = b - 1; } The register allocation to be used is as follows: \$a1=a , and \$a2=b . Q5. (20 pts.) Comment all the lines in the following MIPS instruction sequence. Explain what the program does (Assume that \$t1=\$t2=0 initially) bge \$t8, \$zero, this sub \$s0, \$zero, \$t8 addi \$t1, \$t1, 1 j next this: addu \$s0, \$t8, \$zero addi \$t2, \$t2, 1 next:...
View Full 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