100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
MIPS Test Questions with All Correct Answers $12.59   Add to cart

Exam (elaborations)

MIPS Test Questions with All Correct Answers

 12 views  0 purchase
  • Course
  • MIPS
  • Institution
  • MIPS

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 followin...

[Show more]

Preview 4 out of 39  pages

  • September 3, 2024
  • 39
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • MIPS
  • MIPS
avatar-seller
Scholarsstudyguide
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.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Scholarsstudyguide. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.59. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

81113 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.59
  • (0)
  Add to cart