Created 06/19/03; edited: 02/17/08, 07/21/15


Quiz on Multiplication and Division Instructions

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. If you have two integers, each represented in 32 bits, how many bits might be needed to hold the product?

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

2. What are the names of the two registers that hold the result of a multiply operation?

A.    high and low
B.    hi and lo
C.    R0 and R1
D.    $0 and $1

3. Which operation is used to multiply two's complement integers?

A.    mult
B.    multu
C.    multi
D.    mutt

4. Which instruction moves the least significant bits of a product into register eight?

A.    move $8,lo
B.    mvlo $8,lo
C.    mflo $8
D.    addu $8,$0,lo

5. If you have two integers, each represented in 32 bits, how many bits should you be prepared to have in the quotient?

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

6. After a div instruction, which register holds the quotient?

A.    lo
B.    hi
C.    high
D.    $2

7. What instruction is used to divide two's complement integers?

A.    dv
B.    divide
C.    divu
D.    div

8. Perform an arithmetic shift right by two bits of the following bit pattern:

1001 1011
A.    1110 0110
B.    0010 0110
C.    1100 1101
D.    0011 0111

9. If a general purpose register holds a bit pattern that represents an integer, an arithmetic shift right of one position has what effect?

A.    If the integer is unsigned, the shift divides it by two. If the integer is signed, the shift divides it by two.
B.    If the integer is unsigned, the shift divides it by two. If the integer is signed, the shift may produce an incorrect result.
C.    If the integer is unsigned, the shift may produce an incorrect result. If the integer is signed, the shift divides it by two.
D.    The shift multiplies the number by two.

10. Which list of instructions computes 3x+7, where x starts out in register $8 and the result is put in $9?

A.   
ori    $3,$0,3
mult   $8,$3
mflo   $9
addiu  $9,$9,7
B.   
ori    $3,$0,3
mult   $8,$3
addiu  $9,$8,7
C.   
ori    $3,$0,3
mult   $8,$3
mfhi   $9
addiu  $9,$9,7
D.   
mult   $8,3
mflo   $9
addiu  $9,$9,7

   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.