Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2: Show the steps in the implementation of the algorithms to obtain the result of the following instructions. (5 points each) (a) Show the

Question 2: Show the steps in the implementation of the algorithms to obtain the result of the following instructions. (5 points each)

(a) Show the steps in the (shift and add) binary multiplication algorithm to multiply two 6-bit signed (two's complement) numbers. Write the resultant register in hexadecimal.

mult $s0, $s1 # $s0 = 0xFFFFFFE4 and $s1 = 0x18 mflo $s2

(b) Show the steps in the (shift and subtract) binary division algorithm to compute the quotient and remainder when two 6-bit signed (two's complement) numbers are divided. Write the resultant registers in hexadecimal.

div $s0, $s1 # $s0 = 0xFFFFFFE4 and $s1 = 0x18 mflo $s2 mfhi $s3

For parts (c) and (d), consider all floating point registers have the following default values: $f0 to $f15 = 0xFFFFFFFF and $f16 to $f31 = 0x0. Modifications in some register values are specified for each of the subparts.

(c) Show the steps to subtract the following double precision floating point numbers. Write the resultant registers in hexadecimal.

sub.d $f4, $f8, $f12 # $f8 = 0xBFDFFFFF and $f12 = 0xC02FFFFF

(d) Show the steps to subtract the following double precision floating point numbers. Write the resultant registers in hexadecimal.

mul.d $f16, $f20, $f24 # $f20 = 0xABC30000 and $f24 = 0x73DD0000

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

What are the four types of cash outflows from operations?

Answered: 1 week ago

Question

=+ 4. Why should policymakers think about incentives?

Answered: 1 week ago

Question

=+ 2. What is the opportunity cost of seeing a movie?

Answered: 1 week ago

Question

=+ what roles should government play in them ?

Answered: 1 week ago