midexamsummer05

# midexamsummer05 - (IEEE-754 single precision floating...

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

Computer Organization CDA-3103 Mid-Term Exam Summer 2005 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.) Implement the following Boolean function using an 8:1 multiplexer. D C A CD B D C B D C A F + + + =
Q2 (20 pts.) Given the bit pattern: 1111 1111 1111 1111 1111 1111 0101 0111 a. (6 points) What is the hexadecimal value that this pattern represents, assuming that it is an unsigned integer? How would you convert it to decimal (you don’t have to simplify)? b. (6 points) What is the decimal value that this pattern represents, assuming that it is a two's complement integer? c. (8 points) What is the binary number resulting from adding this number to itself assuming that it is a two’s complement integer? Is the result a valid number in a 32- bit machine? Explain. .

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

View Full Document
Q3. (20 pts.) Answer both parts. a. (10 pts.) Convert 11010011011000000000000000000000

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: (IEEE-754 single precision floating point) to base 10. b. (10 pts.) Convert 5 1-(base 10) to IEEE-754 single precision floating point format. Q4. (20 pts.) Explain what the following MIPS instruction sequence does. Comment each line. Make suggestions to optimize the code in terms of the number of instructions being executed both within and outside the loop. add \$t0, \$zero, \$zero # add \$t1, \$zero, \$zero # loop: beq \$a1, \$zero, finish # nor \$t2, \$a0, \$zero # addi \$t2, \$t2, 1 # add \$t0, \$t0, \$t2 # sub \$a1, \$a1, 1 # j loop # finish: addi \$t1, \$t1, 100 # nor \$t1, \$t1, \$zero # addi \$t1, \$t1, 1 # add \$v0, \$t0, \$t1 # Q5. (20 pts.) Write a sequence of MIPS instructions that compares two unsigned integer numbers stored in memory locations X and Y , and returns the larger value in \$v0 . The program should return 1-if the two values are equal....
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

midexamsummer05 - (IEEE-754 single precision floating...

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

View Full Document
Ask a homework question - tutors are online