Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Given below is the MIPS instruction set for the R and I format along with examples of some operations. The function and opcodes are

image text in transcribed

4. Given below is the MIPS instruction set for the R and I format along with examples of some operations. The function and opcodes are given in hexadecimal system t (5 bits) funct (6 bits 20 Inst Format op (6 bits) rs (5 bits)rt (5 bits) 0 0 reg2 reg2 0 0 regl Su InstFormat op (6 bits rs (5 bits) addi regl regl re regl regl constant constant constant constant 23 2b constant InstFormat jump constant Table 1: MIPS Instruction Set Using this table answer the following questions (a) Consider the following C statements. Each is a separate statement. Registers for variables s0 to s7 map to numbers 16 to 23 (given in decimal system) and temporary registers t0 to t7 map to 8 to 15. Give the MIPS assembly code and the hexadecimal instruction for the codes (4 (5+5)-40) iv. while(i-k)(i-i+ 1} (b) The following binary numbers represent certain instructions. Assuming we are using the MIPS instruction set, give the pseudocode, in a C-like format, for each instruction (3*5-15) i. 0000 0010 0001 0000 1000 0000 0010 0000 ii. 1000 1110 0101 0001 0000 0100 1011 0000 iii. 0001 0010 0101 0001 0000 0100 1011 0000

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions