Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Determine the type of the following MIPS instructions: a) xor $t0, $t1, $t2 b) addu $t0, $t1, $t2 c) addiu $t0, $s1, 0xA2C0

1. Determine the type of the following MIPS instructions: a) xor $t0, $t1, $t2 b) addu $t0, $t1, $t2 c) addiu

1. Determine the type of the following MIPS instructions: a) xor $t0, $t1, $t2 b) addu $t0, $t1, $t2 c) addiu $t0, $s1, 0xA2C0 d) subu $t0, $t1, $t2 e) sll $s1, $s2, 8 f) srlv $s1, $s2, $s3 g) sra $s1, $s2, 4 h) add $50, $s1, $s2 i) and $t0, $s1, $s2 j) andi $t0, $s1, 25 2. Translate the following MIPS instructions to binary code: instruction Binary code Xor addu addiu sll srlv add andi $t0, $t1, $t2 $to, $t1, $t2 $t0, $s1, 0xA2C0 $s1, $s2, 8 $s1, $s2, $s3 $50, $s1, $s2 St0, $s1, 25 Code in Hexa 3. Carry out resulting from addition of unsigned numbers can be used to check if the result of addition is incorrect. Write the shortest sequence of MIPS instructions to determine if there is a carry out from the addition of two registers St1 and St2. Place the carry out (0 or 1) in register $10. 4. Write a MIPS assembly program that asks the user to enter an integer, reads the integer and then displays the integer representation in both binary and hexadecimal, assuming 32-bit representation. A sample execution of the program is given below: Example: Enter an integer: -5 Number representation in binary is: 1111111|||||||||||||||||||1111011 Number representation in hexadecimal is: FFFFFFFB

Step by Step Solution

There are 3 Steps involved in it

Step: 1

The image you have provided shows a computer science assignment relating to MIPS Microprocessor without Interlocked Pipelined Stages assembly language instructions Below are the tasks as listed in the ... 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

Calculus Early Transcendentals

Authors: James Stewart

7th edition

538497904, 978-0538497909

More Books

Students also viewed these Programming questions

Question

Evaluate 1 + tan x - 1 + sin x/x3. lim

Answered: 1 week ago