Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields: op=0, rs=3, rt=2, rd3, shamt=0, funct=34
Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields: op=0, rs=3, rt=2, rd3, shamt=0, funct=34
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
skan the answer
![[1] Provide the type, assembly language instruction, and binary representation of
instruction described by the following MIPS fields:
op=0, rs=3, rt=2, rd=3, shamt-D0, funct=34
[2] Provide the type, assembly language instruction, and binary representation of
instruction described by the following MIPS fields:
op=0x23, rs=1, rt=2, const=0x4
[3] Assume that registers $s0 and $s1 hold the values 0x80000000 and 0XD0000000,
respectively.
(a) What is the value of $t0 for the following assembly code?
add $t0, $s0, $s1
(b) For the contents of registers $s0 and $s1 as specified above, What is the
value of $t0 for the following assembly code?
sub $t0, $s0, $s1
(c) For the contents of registers $s0 and $sl as specified above, What is the
value of $t0 for the following assembly code?
add $t0, $s0, $s1
add $t0, $t0, $s0
[4] Assume the following register contents: $t0 = 0XAAAAAAAA, $t1 = 0x12345678.
For the register values shown above, what is the value of St2 for the following
sequence of instructions?
(a) slti $t2, $t0, 4
or
$t2, $t2, $t1
(b) sll $t2, $t0, 4
andi $t2, $t2, -1
[5] The following problems deal with translating from C to MIPS. Assume that the
variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and Ss4,
respectively. Assume that the base address of the arrays A and B are in registers Ss6
and $s7, respectively. What is the corresponding MIPS assembly code?
f = -g - A [4];
A[i-j];
а.
b.
B[8]
%3!](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F79035548-cf20-4ba3-905e-e6582519008b%2F352ab192-24da-47bf-bcfb-9b86bd45d5f5%2Fhghaapa_processed.jpeg&w=3840&q=75)
Transcribed Image Text:[1] Provide the type, assembly language instruction, and binary representation of
instruction described by the following MIPS fields:
op=0, rs=3, rt=2, rd=3, shamt-D0, funct=34
[2] Provide the type, assembly language instruction, and binary representation of
instruction described by the following MIPS fields:
op=0x23, rs=1, rt=2, const=0x4
[3] Assume that registers $s0 and $s1 hold the values 0x80000000 and 0XD0000000,
respectively.
(a) What is the value of $t0 for the following assembly code?
add $t0, $s0, $s1
(b) For the contents of registers $s0 and $s1 as specified above, What is the
value of $t0 for the following assembly code?
sub $t0, $s0, $s1
(c) For the contents of registers $s0 and $sl as specified above, What is the
value of $t0 for the following assembly code?
add $t0, $s0, $s1
add $t0, $t0, $s0
[4] Assume the following register contents: $t0 = 0XAAAAAAAA, $t1 = 0x12345678.
For the register values shown above, what is the value of St2 for the following
sequence of instructions?
(a) slti $t2, $t0, 4
or
$t2, $t2, $t1
(b) sll $t2, $t0, 4
andi $t2, $t2, -1
[5] The following problems deal with translating from C to MIPS. Assume that the
variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and Ss4,
respectively. Assume that the base address of the arrays A and B are in registers Ss6
and $s7, respectively. What is the corresponding MIPS assembly code?
f = -g - A [4];
A[i-j];
а.
b.
B[8]
%3!
![[6] The following problems deal with translating from C to MIPS. Assume that the
variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, Ss3, and $s4,
respectively. Assume that the base address of the arrays A and B are in registers $s6
and $s7, respectively. Assume that the elements of the arrays A and B are 4-byte words:
f = f + A[2];
B[8]
а.
b.
A[i] + A[j];
%3!
For the C statements above, what is the corresponding MIPS assembly code?
[7] For these problems, the table holds various binary values for register St0. Given the
value of $t0, you will be asked to evaluate the outcome of different branches.
а.
Ox00101000
b.
Ox80001000
Suppose that register St0 contains a value from above. What is the value of $t2 after
the following instructions?
$t2, $0, $to
$t2, $0, ELSE
slt
bne
DONE
ELSE:
addi $t2, $t2, 2
DONE :
[8] Assume that the variables f, g, h, i, and j are assigned to registers $s0, Ss1, Ss2, Ss3,
and $s4, respectively. Assume that the base address of the arrays A and B are in
registers $s6 and Ss7, respectively.
(a) What is the corresponding MIPS assembly code For the C statement:
f = g - A[3]+ B[4];
(b) What is the corresponding C statement? For the MIPS assembly instructions
lw $s0, 4 ($s6)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F79035548-cf20-4ba3-905e-e6582519008b%2F352ab192-24da-47bf-bcfb-9b86bd45d5f5%2F419zld6_processed.jpeg&w=3840&q=75)
Transcribed Image Text:[6] The following problems deal with translating from C to MIPS. Assume that the
variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, Ss3, and $s4,
respectively. Assume that the base address of the arrays A and B are in registers $s6
and $s7, respectively. Assume that the elements of the arrays A and B are 4-byte words:
f = f + A[2];
B[8]
а.
b.
A[i] + A[j];
%3!
For the C statements above, what is the corresponding MIPS assembly code?
[7] For these problems, the table holds various binary values for register St0. Given the
value of $t0, you will be asked to evaluate the outcome of different branches.
а.
Ox00101000
b.
Ox80001000
Suppose that register St0 contains a value from above. What is the value of $t2 after
the following instructions?
$t2, $0, $to
$t2, $0, ELSE
slt
bne
DONE
ELSE:
addi $t2, $t2, 2
DONE :
[8] Assume that the variables f, g, h, i, and j are assigned to registers $s0, Ss1, Ss2, Ss3,
and $s4, respectively. Assume that the base address of the arrays A and B are in
registers $s6 and Ss7, respectively.
(a) What is the corresponding MIPS assembly code For the C statement:
f = g - A[3]+ B[4];
(b) What is the corresponding C statement? For the MIPS assembly instructions
lw $s0, 4 ($s6)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education