Created 06/19/03; edited: 02/17/08, 02/27/11


QUIZ on Chapters 9 thru 12

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 with each question.



1.   What is a directive, such as the directive .text?

A.   an assembly language statement that results in one machine language instruction.
B.   one of the menu choices in the SPIM menu system.
C.   a machine language instruction that causes an operation on data.
D.   a statement that tells the assembler something about what the programmer wants, but does not itself directly correspond to a machine instruction.

2.   What algorithm does MIPS use for 32-bit addition?

A.   the Binary Addition Algorithm
B.   the two's complement addition algorithm
C.   the unsigned addition algorithm
D.   a proprietary addition algorithm

3.   What "general purpose register" is permanently set to thirty-two zero bits?

A.   $0
B.   $1
C.   $lo
D.   PC

4.   What is the address of the first byte of memory in a 32-bit machine?

A.   0x00000000
B.   0x10000000
C.   0x00400000
D.   0xFFFFFFFF

5.   What is it called when a logical operation is performed between the bits of each column of the operands to produce a result bit for each column?

A.   logic operation
B.   column operation
C.   bitwise operation
D.   immediate operation

6.   Which of the following instructions loads register $5 with the bit pattern that represents positive 48?

A.   ori $5,$0,0x48
B.   ori $5,$0,48
C.   ori 0x48,$5
D.   ori $0,$5,0x48

7.   Which of the following instructions clears all the bits in register $8 except for the low order byte, which is unchanged?

A.   ori $8,$8,0xFF
B.   ori $8,$0,0x00FF
C.   xori $8,$8,0xFF
D.   andi $8,$8,0xFF

8.   Which of the following instructions sets bit 0 of register $8 and leaves all other bits unchanged?

A.   ori $8,$8,0x1
B.   ori $8,$0,0x0001
C.   andi $8,$0,0x01
D.   andi $8,$8,0x00

9.   Which of the following instructions is often used for a no-op?

A.   sll $0,$0,0
B.   sll $0,$0,$0
C.   sll 0,0,0
D.   srl $0,$0,$0

10.   Write the assembly language instruction that copies the bit pattern in register $13 to register $15.

A.   ori $15,$13,$0
B.   xor $7,$8,$9
C.   xor $9,$8,$7
D.   or $15,$13,$0


Click here