midexamfall05

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

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

## This note was uploaded on 08/22/2010 for the course CDA 3101 taught by Professor Staff during the Fall '07 term at University of Central Florida.

### Page1 / 6

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

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online