• ¿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 2 fuera de 8 páginas
Examen

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

Document preview thumbnail
Vista previa 2 fuera de 8 páginas

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

Vista previa del contenido

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

Información del documento

Subido en
22 de agosto de 2024
Número de páginas
8
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$13.49

¿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.
RealGrades
4.0
(26)
Vendido
201
Seguidores
52
Artículos
12412
Última venta
2 semanas 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