Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write MIPS instruction sequences to perform the following operations. Do not use pseudoinstructions. In addition to OR, ORI, AND, and ANDI, the MIPS ISA

image text in transcribed
2. Write MIPS instruction sequences to perform the following operations. Do not use pseudoinstructions. In addition to OR, ORI, AND, and ANDI, the MIPS ISA also has NOR (R-Type), XOR (R-Type) and XORI (I- Type). Make the best use of all logical instructions For full credit you must use a minimum length sequence. HINT: QtSPIM can be used to check the correctness of your sequences, but no QtSPIM program is required. For each operation, the input and output register is specified. Use the St registers if other registers are needed. a) Extract byte 2 (bits 16 to 23) of the value stored in Ss0, b) Clear bits 12 thru 15 of Ss0 (modify Ss0 in place). c) Set bits 22 and 23 of Ss0 (modify $s0 in place). Leave placing them in the low order byte (bits 0 thru 7) of Ss Leave the other bits unmodified. the other bits unmodified. d) Invert the even bits (bit 0,2,4,6,..30) byte of Ss0. Leave the odd bits unmodified. e) Replace byte 1 (bits 8 to 15) of Ss0 with the low-order byte of Ss1. Modify Ss0 in place

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions