Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Using decimal numbers to represent the value of each field and assuming that here labels the instruction at address 0x400020, write the MIPS machine

a) Using decimal numbers to represent the value of each field and assuming that here labels the instruction at address 0x400020, write the MIPS machine language code for each of the following assembly language instructions:

here: lw $t0, 0($s0) bne $t0, $zero, NegNum PosNum: add $s0, $s0, $s1 j here NegNum:

Clearly indicate the instruction format (R, I, or J) used by each instruction. Note that 0x400020 = 419433610. [NOTE: if you prefer, you may write the jump address only -- as a hexadecimal number!]

b) Show the 32-bit BINARY representation of the add instruction from part (a), clearly separating the groups of bits comprising each field (opcode, rs, etc.).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions