Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(30 points)Read section 2.5 of your textbook(Representing Instructions in the Computer). Then, use the MIPS instructions encoding listed in Figure 2.5 to find the machine

image text in transcribedimage text in transcribed

(30 points)Read section 2.5 of your textbook(Representing Instructions in the Computer). Then, use the MIPS instructions encoding listed in Figure 2.5 to find the machine code representation of the following two MIPS assembly instructions. Your answers need to show i) the binary values of each MIPS field, and ii) the hexadecimal equivalent value of the whole instructions. a) addi $s3, $t0, 25 b) sw $t1, 100($S1) (Note that each MIPS instruction will be exactly 32-bits long) Instruction Format op rs rt rd shamt funct address add R O reg 0 32ten na. R 0 reg reg reg reg 0 34ten n.a. | reg reg reg reg reg n.a. n.a. n.a. sub (subtract) add immediate lw (load word) SW (store word) constant Sten 35ten 1 reg n.a. n.a. n.a. address 43ten reg n.a. n.a. n.a. address FIGURE 2.5 MIPS instruction encoding. In the table above, reg means a register number between 0 and 31, address means a 16-bit address, and n.a." (not applicable) means this field does not appear in this format. Note that add and sub instructions have the same value in the op field; the hardware uses the funct field to decide the variant of the operation: add (32) or subtract (34)

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

Students also viewed these Databases questions

Question

Use social media to advantage

Answered: 1 week ago