Created 07/03/03


Quiz on Logic and Math

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 is the bitwise not of 0110 1010?

A.    0000 0000
B.    1111 1111
C.    1001 0101
D.    1010 1011

2. Translate the following pseudoinstruction into basic assembly language:

not $t5,$s1
A.   
not $t5,$s1,$0
B.   
not $t5,$s1
C.   
nor $t5,$s1
D.   
nor $t5,$s1,$0

3. Which of the following instructions will be translated by the extended assembler into one or more basic instructions?

A.    or $s0,$t6,$t7
B.    or $s0,$t0,0xffff
C.    addiu $t0,$t5,32
D.    subu $s0,$t3,$t6

4. Translate the following pseudoinstruction into basic assembly language:

negu  $s1,$t1
A.    addu $s1,$0,-$t1
B.    nor $s1,$0,$t1
C.    sub $s1,$t1,$0
D.    sub $s1,$0,$t1

5. Write the pseudoinstruction that multiplies $t3 by $s0 and puts the result in $v0

A.    mul $v0,$s0,$t3
B.    mult $v0,$s0,$t3
C.    mulu $v0,$s0,$t3
D.    multi $v0,$s0,$t3

6. Translate the following pseudoinstuction into basic instructions:

div   $s0,$t0,$t1
A.   
divu  $s0,$t0,$t1
B.   
div   $t0,$t1
mflo  $s0
C.   
div   $t0,$t1
mfhi  $s0
D.   
div   $t1,$t0
mflo  $s0

7. Translate the following pseudoinstuction into basic instructions:

remu  $s0,$t0,$t1 
A.   
divu  $s0,$t0,$t1
B.   
div   $t0,$t1
mflo  $s0
C.   
div   $t0,$t1
mfhi  $s0
D.   
div   $t1,$t0
mflo  $s0

8. Rotate the following bit pattern two positions RIGHT:

10001101
A.   
00110100
B.   
01100011
C.   
10001101
D.   
10000001

9. Rotate the following bit pattern two positions LEFT:

10001101
A.   
00110110
B.   
00110100
C.   
10001101
D.   
10000001

10. Which sequence rotates the bits in $t0 two positions right?

A.   
li  $t1,2
ror $t0,$t0,$t1
B.   
li  $t1,-2
ror $t0,$t0,$t1
C.   
rol $t0,$t0,-2
D.   
rol $t0,$t0,2

   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.