• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 39 páginas
Examen

MIPS Test Questions with All Correct Answers

Document preview thumbnail
Vista previa 4 fuera de 39 páginas

MIPS Test Questions with All Correct Answers Which one of the following address are half-word aligned? A. 0x01004F35 B. 0x01004F37 C. 0x01004F3A D. 0x01004F3F - Answer-C. 0x01004F3A Say that data is in memory and the base register has been initialized correctly. You have the following program: lh $5,0($10) lb $6,4($10) addu $7,$5,$4 What does the addu instruction do? A. It performs the binary addition algorithm on whatever 32-bit patterns are in registers $4 and $5. B. It performs a 16-bit addition because that is the size of the largest operand. C. It performs an 8-bit addition. D. The instruction causes a trap because the operands are not the same sizes. - Answer-A. It performs the binary addition algorithm on whatever 32-bit patterns are in registers $4 and $5. Which of the following assembler directives reserves 1210 bytes of memory? A. .word 3 B. .byte 12 C. .block 6 D. .space 12 - Answer-D. .space 12 You wish to speed up the execution of a C program. The program runs on a 32-bit processor. You notice that the variables in the program are a mix of short int, int and long int variables. The program does a great deal of integer arithmetic. How might you speed up this program? A. Make as many variables of type int as is possible. B. Make as many variables of type short int as is possible. C. Make all variables as small as is needed for the range of values they are exected to hold. D. Shorten the names of all the variables. - Answer-A. Make as many variables of type int as is possible.

Vista previa del contenido

MIPS Test Questions with
All Correct Answers
Which one of the following address are half-word aligned?

A. 0x01004F35
B. 0x01004F37
C. 0x01004F3A
D. 0x01004F3F - Answer-C. 0x01004F3A

Say that data is in memory and the base register has been initialized correctly. You
have the following program:

lh $5,0($10)
lb $6,4($10)
addu $7,$5,$4
What does the addu instruction do?

A. It performs the binary addition algorithm on whatever 32-bit patterns are in registers
$4 and $5.
B. It performs a 16-bit addition because that is the size of the largest operand.
C. It performs an 8-bit addition.
D. The instruction causes a trap because the operands are not the same sizes. -
Answer-A. It performs the binary addition algorithm on whatever 32-bit patterns are in
registers $4 and $5.

Which of the following assembler directives reserves 1210 bytes of memory?

A. .word 3
B. .byte 12
C. .block 6
D. .space 12 - Answer-D. .space 12

You wish to speed up the execution of a C program. The program runs on a 32-bit
processor. You notice that the variables in the program are a mix of short int, int and
long int variables. The program does a great deal of integer arithmetic. How might you
speed up this program?

A. Make as many variables of type int as is possible.

, B. Make as many variables of type short int as is possible.
C. Make all variables as small as is needed for the range of values they are exected to
hold.
D. Shorten the names of all the variables. - Answer-A. Make as many variables of type
int as is possible.

A digital image is stored in a file. The pixels of the image represent a gray level of 0 to
255. What instruction are you likely to use in loading a register with the value of a pixel?

A. lb
B. lbu
C. lh
D. lhu - Answer-B. lbu

How does SPIM display the data section of simulated main memory?

A. One byte per address in columns.
B. In groups of 4-byte words with the highest address on the right.
C. In groups of 4-byte words with the lowest address on the right.
D. This depends on the type of data in memory. - Answer-C. In groups of 4-byte words
with the lowest address on the right.

What are the three steps in the machine cycle?

A. increment the PC; fetch the instruction; execute the instruction
B. fetch the instruction; execute the instruction; increment the PC
C. execute the instruction; fetch the instruction; increment the PC
D. fetch the instruction; increment the PC; execute the instruction - Answer-D. fetch the
instruction; increment the PC; execute the instruction

What are the four bytes immediately following a jump instruction called?

A. fetch delay slot
B. pipeline delay slot
C. branch delay slot
D. PC advance slot - Answer-C. branch delay slot

What is a pipeline?

A. Several words of data from memory are moved into the processor before
instructions need them.
B. Several sequential instructions are simultaneously prepared for execution while one
instruction finishes its execution.
C. A single instruction is divided into four phases and each phase is executed in one
machine cycle.

, D. Multiple items of data are sent down the system bus like water in a pipe. - Answer-B.
Several sequential instructions are simultaneously prepared for execution while one
instruction finishes its execution.

Say that a sll instruction is located in memory at address 0x400100, and an add
instruction is located in memory at address 0x400104. After the add instruction
executes, what value will be in the PC?

A. 0x400100
B. 0x400104
C. 0x400105
D. 0x400108 - Answer-D. 0x400108

Say that a j (jump) instruction is located in memory at address 0x400100, and a sll
instruction is located in memory at address 0x400104. After the j instruction executes,
what value will be in the PC?

A. 0x400100
B. 0x400101
C. 0x400102
D. 0x400104 - Answer-D. 0x400104

Here is a schematic program loop.

Address Instruction
(details omitted) PC just after this
instruction has executed
(at the bottom of the cycle)
............... ........... 00450008
00450008 add 0045000C
0045000C store 00450010
00450010 jump 0x00450008 004500___
00450014 no-op 004500___
What numbers go into the two blanks? - Answer-A.
14
08

Here is a 32-bit j instruction. The first 6 bits are the op-code.

000010 00 0001 0000 0000 0000 0000 1000
Here is the value of the PC while the target address is being constructed:

0000 1000 0001 0000 0000 1100 0110 1000
What address does the j put into the PC?

A. 0000 00 0001 0000 0000 0000 0000 1000 00

, B. 0000 1000 0001 0000 0000 1100 0110 1000
C. 0000 10 0001 0000 0000 1100 0110 1000 00
D. 1000 00 0001 0000 0000 0000 0000 1000 00 - Answer-A. 0000 00 0001 0000 0000
0000 0000 1000 00


What is the architecture of a processor? - Answer-D. a description of the basic
components of a processor chip and of its basic operations

What language allows the programmer to program the processor at the architectural
level? - Answer-A. assembly language

What is the machine cycle? - Answer-C. A machine cycle is the process through which
one machine instruction is executed.

What are the three steps in the machine cycle? - Answer-A. fetch, increment, execute

What is a machine instruction? - Answer-C. a pattern of bits that asks for one
fundamental operation of the processor.

What part of the processor indicates which machine instruction is next in line for
execution? - Answer-C. The program counter.

What is a register? - Answer-D. a part of the processor that holds a bit pattern.

Do all processor chips use the same machine language? - Answer-A. No. Machine
language is an engineering decision that is unique to each processor family.

Assemblers and compilers usually translate a source program into machine instructions
contained in what type of file? - Answer-C. object module

What type of program uses software to imitate the hardware operation of a particular
type of processor? - Answer-D. emulator

What is a source file?

A. a text file that contains statements of programming language.
B. a subdirectory that contains programs.
C. a file that contains data for a program.
D. a document that contains the requirements for a project - Answer-A. a text file that
contains statements of programming language.

What is a register?

A. a part of the computer system that keeps track of system parameters.
B. a part of the processor that holds a bit pattern.
C. a part of the processor that contains its unique serial number.

Información del documento

Subido en
3 de septiembre de 2024
Número de páginas
39
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$13.09

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Scholarsstudyguide
3.8
(169)
Vendido
847
Seguidores
476
Artículos
16375
Última venta
1 semana hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes