Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4,6 TrustPilot
logo-home
Examen

CSc 256 MIPS Assembly Instructions Certification Exam Example Questions And Answers.

Note
-
Vendu
-
Pages
8
Grade
A+
Publié le
22-08-2024
Écrit en
2024/2025

Instruction Set - correct answer the vocabulary of commands understood by a given architecture. MIPS operands - correct answer 32 registers 2^30 memory words Register #0: $zero used for - correct answer constant zero Registers # 2 and 3: $v0 and $v1 used for - correct answer Expression evaluation and results of a function Registers# 4,5,6,7: $a0, $a1, $a2, $a3 used for - correct answer Argument 1 Argument 2 Argument 3 Argument 4 Registers # 8,9,10,11,12,13,14,15: $t0-$t7 used for - correct answer Temporary (not preserved across call) Registers # 16,17,18,19, 20, 21,22, 23: $s0-$s7 are used for - correct answer Saved temporary (preserved across call) Registers # 24,25: $t8, $t9 used for - correct answer Temporary (not preserved across call) Register #28: $gp used for - correct answer Pointer to global area Register #29: $sp used for - correct answer Stack pointer Register#30: $fp (or $s8) used for - correct answer Frame pointer Register#31: $ra used for - correct answer Return address (used by function call) Word - correct answer The natural unit of access in a computer, a group of 32 bits, corresponds to the size of the register in MIPS architecture. Words are multiples of bytes. There are 4 bytes in a word. Each byte is 8 bits. Data transfer instruction - correct answer a command that moves data between memory and registers Address (memory address) - correct answer a value used to delineate the location of a specific data element within a memory array Memory - correct answer a large single-dimensional array, with the address acting as the index to that array, starting at 0. Load word ( lw ) - correct answer data transfer instruction that copies data from memory to a register. Format: name of operation + register to be loaded+ memory address [offset constant and register used to access memory (base register)]. MIPS addresses for words - correct answer Multiples of 4. To get a proper byte address, the offset to be added to the base register (register used to form an address) is X times 4. The addresses (array index) are 0, 4, 8, 12,16 and so on Store word - correct answer copies data from register to memory Spilling registers - correct answer a process of putting less commonly used variables or those needed later into memory Add immediate (addi) - correct answer uses constant as one of the 3 operands. used to add constant to register. addi $s3, $s3, 4 Negative numbers - correct answer to form a negative number- invert the bits and add 1. left most bit are ones- represent negative sign in signed numbers Machine language - correct answer (numeric form of instruction) binary representation used for a communication within a computer system Machine code - correct answer sequence of instructions in numeric form R-format type of instruction format (add, sub) - correct answer R stands for Register. has the following 6 fields: -op (6bits): denotes format and operation of an instruction -opcode -rs (5 bits): the first register source operand -rt (5 bits): the second register source operand -rd (5 bits): The register destination operand. It gets the result of operation -shamt( 5 bits): shift amount -funct (6 bits): Function. This field is function code, selects the specific variant of the operation in op field I-format, type of instruction format (lw, sw) - correct answer I stands for immediate. has the following 4 fields: -op (6 bits) -rs (5 bits): base register -rt (5 bits): destination register -constant or address (16 bits) sll and srl - correct answer logical operations that move by n bits to left or right, shift-left-logical, shift-right-logical (sll, $t0, 2) Conditional branches: beq- branch if equal and bne- branch if not equal - correct answer an instruction that requires a comparison of two values and that allows for a subsequent transfer of control to a new address in a program based on the outcome of the comparison. used in if-then-else, loops Unconditional branch: j-jump - correct answer used in loops slt - correct answer set on less than. set one register to 1 when value in second register is less than the value in the third register. used in "for" and other loops slt $t0, $s3, $s4 //$t0=1 if $s3$s4 slti - correct answer test if register is less than constant and set the other register for 1 if it is. slti $t0, $s2, 10 Conditional instructions - correct answer bne, beq, slt, slti and $zero are used to create conditons not equal, equal, less than, less than or equal, greater than, greater than or equal Jump address table or jump table - correct answer a table of addresses of alternative instruction sequence Case or Switch statement - correct answer uses jr - jump register instruction, unconditional jump to the address specified in a register. procedure - correct answer a stored subroutine that performs a specific task based on the parameters with which it is provided Jump and Link instruction: jal - correct answer used to call subroutines, the next instruction is linked Program Counter (PC) [instruction address register] - correct answer $pc Hexadecimal notation - correct answer Uses base 16. It's more compact than binary, but readable. Sign Magnitude - correct answer 1st bit represents sign, remaining bits represent magnitude. == Weaknesses == - Two representations of 0. - Different operations on signed and unsigned integers. Two's Complement - correct answer Equivalent to taking one's complement and adding 1. == Strengths == - Same operations for signed and unsigned! - One representation of 0! == Weaknesses == - Not symmetric around zero. Maximum integer expressible w/ 32 bits - correct answer -2^31-1 (also 0x7fffffff) Minimum integer expressible in 32-bit 2's complement - correct answer -2^31 (also 0x) 0x + 0x - correct answer 0x0 32 bit machines - correct answer Can store 2^32 memory locations = 4 GB 64 bit machines - correct answer Can store 2^64 memory locations = 16 GB Big-endian - correct answer Most significant bytes first in memory Little-endian - correct answer Least significant bytes first in memory (Most Intel-compatible machines are little-endian) Unary Operator - correct answer An operator requiring only one operand to give a simple result XOR - correct answer output is true if the two inputs are different, output is False if the two inputs are alike Sentinel - correct answer a special value that marks the end of a set of data. Also called and "end of data marker" or "rogue value". Recursion - correct answer A process whereby a method refers to itsself. In many programming languages, a procedure of function can call itsself. Reference - correct answer Contains the location in memory of an object. The object can contain many individual data members. arrays - correct answer can only be initialized at the time of declaration pointer variable - correct answer contains the value stored at a particular memory address 11011 - correct answer 27 in decimal absolute - correct answer An ____ address is a variable's or routine's actual address in memory aliasing - correct answer A situation in which the same object is accessed by two addresses; can occur in virtual memory when there are two virtual addresses for the same physical page. alignment restriction - correct answer A requirement that data be aligned in memory on natural boundaries. address translation - correct answer Also called address mapping, it's the process by which a virtual address is mapped to an address used to access memory. addressing mode - correct answer One of several addressing regimes delimited by their varied use of operands and/or addresses. basic block - correct answer A sequence of instructions without branches (except possibly at the end) and without branch targets or branch labels. assembler - correct answer A program that translates a symbolic version of instructions into the binary version. assembler directive - correct answer An operation that tells the assembler how to translate a program but does not produce machine instructions; always begins with a period. callee-saved register - correct answer A registe

Montrer plus Lire moins
Établissement
MIPS
Cours
MIPS

Aperçu du contenu

CSc 256 MIPS Assembly Instructions

Instruction Set - correct answer the vocabulary of commands understood by a
given architecture.



MIPS operands - correct answer 32 registers

2^30 memory words



Register #0: $zero used for - correct answer constant zero



Registers # 2 and 3: $v0 and $v1 used for - correct answer Expression
evaluation and

results of a function



Registers# 4,5,6,7: $a0, $a1, $a2, $a3 used for - correct answer Argument 1

Argument 2

Argument 3

Argument 4



Registers # 8,9,10,11,12,13,14,15: $t0-$t7 used for - correct answer Temporary
(not preserved across call)



Registers # 16,17,18,19, 20, 21,22, 23: $s0-$s7 are used for - correct answer
Saved temporary (preserved across call)



Registers # 24,25: $t8, $t9 used for - correct answer Temporary (not preserved
across call)



Register #28: $gp used for - correct answer Pointer to global area

, Register #29: $sp used for - correct answer Stack pointer



Register#30: $fp (or $s8) used for - correct answer Frame pointer



Register#31: $ra used for - correct answer Return address (used by function
call)



Word - correct answer The natural unit of access in a computer, a group of 32
bits, corresponds to the size of the register in MIPS architecture. Words are multiples of bytes. There are
4 bytes in a word. Each byte is 8 bits.



Data transfer instruction - correct answer a command that moves data
between memory and registers



Address (memory address) - correct answer a value used to delineate the
location of a specific data element within a memory array



Memory - correct answer a large single-dimensional array, with the address
acting as the index to that array, starting at 0.



Load word ( lw ) - correct answer data transfer instruction that copies data
from memory to a register. Format:

name of operation + register to be loaded+ memory address [offset constant and register used to access
memory (base register)].



MIPS addresses for words - correct answer Multiples of 4. To get a proper byte
address, the offset to be added to the base register (register used to form an address) is X times 4. The
addresses (array index) are 0, 4, 8, 12,16 and so on



Store word - correct answer copies data from register to memory

École, étude et sujet

Établissement
MIPS
Cours
MIPS

Infos sur le Document

Publié le
22 août 2024
Nombre de pages
8
Écrit en
2024/2025
Type
Examen
Contient
Questions et réponses

Sujets

€11,93
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien


Document également disponible en groupe

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
RealGrades Nursing
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
172
Membre depuis
2 année
Nombre de followers
52
Documents
11819
Dernière vente
2 semaines de cela

4,0

26 revues

5
12
4
5
3
7
2
1
1
1

Documents populaires

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions