Created 12/09/02; edited: 05/30/15


Quiz on MIPS Floating Point

Instructions: For each question, choose the single best answer. Make your choice by clicking on its button. You can change your answers at any time. When the quiz is graded, the correct answers will appear in the box after each question.



1. What advantage does 64-bit double precision have over 32-bit single precision?

A.    Increased precision.
B.    A greater range of values is covered.
C.    Greater speed.
D.    Increased precision and a greater range of values.

2. How many single precision floating point registers does MIPS have?

A.    8
B.    16
C.    32
D.    64

3. What is special about register $f0?

A.    It always holds a floating point zero.
B.    It always holds an integer zero.
C.    It gets the results of a multiply operation.
D.    Nothing is special about it.

4. With actual hardware is there a load delay associated with loading a floating point register from memory?

A.    No. Only integers cause a load delay.
B.    No. Load delays do not apply to coprocessor 0.
C.    Yes. To main memory a floating point representation is just a bit pattern like any other.
D.    Yes. Floating point bits take longer to move.

5. Does each possible 32-bit pattern represent a single precision float?

A.    No. Most 32-bit patterns represent only integers.
B.    No. Some 32-bit patterns put illegal values in the fields of the float.
C.    Yes. Each possible 32-bit patterns represents a particular float.
D.    Yes. But some numbers are represented by several 32-bit patterns.

6. Which of the following program fragments copies a floating point value from spotA to spotB?

A.   
l.s $f4,spotA
s.s $f4,spotB
B.   
s.s $f4,spotB
l.s $f4,spotA
C.   
lf $f4,spotA
sf $f4,spotB
D.   
li.f $f4,spotA
si.f $f4,spotB

7. Can a general purpose register be used with a floating point instruction?

A.    Yes, as long as the bit pattern in it represents a float.
B.    Yes, as long as at least one other operand is in a floating point register.
C.    No. It can hold a floating point representation, but can't be used in a floating point operation.
D.    No. General purpose registers can't hold floating point representations.

8. A single precision float has 24 bits of precision. This is equivalent to how many digits in a decimal representation?

A.    7 or 8
B.    9 or 10
C.    12
D.    24 or 25

9. Which of the following code fragments subtracts valB from valA, ensures that the result is positive, and stores the result in result?

A.   
l.s   $f6,valA
l.s   $f8,valB
sub.s $f4,$f6,$f8
abs.s $f4
s.s   $f4,result
B.   
l.s   $f6,valA
l.s   $f8,valB
sub.s $f4,$f6,$f8
abs.s $f4,$f4
s.s   $f4,result
C.   
li.s   $f6,valA
li.s   $f8,valB
sub.s $f4,$f6,$f8
abs.s $f4,$f4
sf.s   $f4,result
D.   
l.s   $f6,valB
l.s   $f8,valA
sub.s $f4,$f6,$f8
abs.s $f4,$f4
s.s   $f4,result

10. Here is a polynomial ax3 + bx2 + cx + d. Factor this polynomial to show how it would be evaluated using Horner's method.

A.    x( x( ax + b) + c) + d
B.    cx + d + ax3 + bx2
C.    x3( a + bx-1) + cx-2) + d
D.    (a + b + c + d)(x3 + x2 + x1 + 1)

The number you got right:       Percent Correct:       Letter Grade:   


Click here

If you have returned here from another page, or have re-loaded this page, you will need to click again on each of your choices for the grading program to work correctly. You may want to press the SHIFT KEY while clicking to clear the old answers.