100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

CSE 230 exam 1 UPDATED ACTUAL Exam Questions and CORRECT Answers

Puntuación
-
Vendido
-
Páginas
5
Grado
A+
Subido en
19-08-2025
Escrito en
2025/2026

CSE 230 exam 1 UPDATED ACTUAL Exam Questions and CORRECT Answers For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables f, g, h, and i are given and could be considered 32-bit integers as declared in a C program. Use a minimal number of MIPS assembly instructions. f = g + (h − 5); - CORRECT ANSWER addi i ,h, -5 add f, g, i For the following MIPS assembly instructions above, what is a corresponding C statement? add f, g, h add f, i, f - CORRECT ANSWER add f,i,f add f,g,h

Mostrar más Leer menos
Institución
CSE
Grado
CSE









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
CSE
Grado
CSE

Información del documento

Subido en
19 de agosto de 2025
Número de páginas
5
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

CSE 230 exam 1 UPDATED ACTUAL
Exam Questions and CORRECT Answers
For the following C statement, what is the corresponding MIPS assembly code? Assume that the
variables f, g, h, and i are given and could be considered 32-bit integers as declared in a C
program. Use a minimal number of MIPS assembly instructions.

f = g + (h − 5); - CORRECT ANSWER addi i ,h, -5
add f, g, i


For the following MIPS assembly instructions above, what is a corresponding C statement?

add f, g, h add f, i, f - CORRECT ANSWER add f,g,h
add f,i,f


For the following C statement, what is the corresponding MIPS assembly code? Assume that the
variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively.
Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.

B[8] = A[i−j]; - CORRECT ANSWER sub $s5, $s2, $s3
sll $s5,$s5,2
add $s5,$s6,$s5
lw $s6, 0($s5)
św $s6, 32 $(s7)


For the MIPS assembly instructions below, what is the corresponding C statement? Assume that
the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively.
Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.
sll $t0, $s0, 2 # $t0 = f * 4
add $t0, $s6, $t0 # $t0 = &A[f]
sll $t1, $s1, 2 # $t1 = g * 4
add $t1, $s7, $t1 # $t1 = &B[g]
lw $s0, 0($t0) # f = A[f]

, addi $t2, $t0, 4
lw $t0, 0($t2)
add $t0, $t0, $s0

sw $t0, 0($t1) - CORRECT ANSWER B[g] = A[f] + A[1+f];


For the following C statement, write a minimal sequence of MIPS assembly instructions that
does the identical operation. Assume $t1 = A, $t2 = B, and $s1 is the base address of C.

A = C[0] << 4; - CORRECT ANSWER lw $t3, 0($s1)
sll $t1, $t3, 4


Assume $t0 holds the value 0x00101000. What is the value of $t2 after the following
instructions?


slt $t2, $0, $t0
bne $t2, $0, ELSE
j DONE
ELSE: addi $t2, $t2, 2

DONE: - CORRECT ANSWER $t2 = 3


What is 5ED4 - 07A4 when these values represent unsigned 16- bit hexadecimal numbers? The
result should be written in hexadecimal. Show your work. - CORRECT ANSWER 5730


Convert 5ED4 into a binary number. What makes base 16 (hexadecimal) an attractive numbering
system for representing values in computers? - CORRECT ANSWER 0101 1110 1101 0100


What is 4365 - 3412 when these values represent unsigned 12-bit octal numbers? The result
should be written in octal. Show your work. - CORRECT ANSWER 7777 = 111 111 111 111


Assume 185 and 122 are unsigned 8-bit decimal integers. Calculate 185 - 122. Is there overflow,
underflow, or neither? - CORRECT ANSWER 63, Neither.
$11.49
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada


Documento también disponible en un lote

Conoce al vendedor

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.
MGRADES Stanford University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
1078
Miembro desde
1 año
Número de seguidores
102
Documentos
68972
Última venta
1 día hace
MGRADES (Stanford Top Brains)

Welcome to MGRADES Exams, practices and Study materials Just think of me as the plug you will refer to your friends Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

171 reseñas

5
73
4
30
3
46
2
8
1
14

Recientemente visto por ti

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