Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# EX 1 4 - mult - SP 2 0 2 1 # Objective: experiment with: # multiply: mult # Description: # mult $s 2

# EX14-mult-SP2021
# Objective: experiment with:
# multiply: mult
# Description:
# mult $s2, $s3
# When $S2(32-bit) x $S3(32-bit) the result is 64 bits
# MIPS processor places:
# * the most significant 32 bits in Register: Hi
# * the least significant 32 bits in Register: Lo
main:
# Case 1: positive x positive = positive:
addi $s2, $zero,2 # $s2=0+2=2
addi $s3, $zero,3 # $s3=0+3=3
mult $s2, $s3 # (2 points) verify with MARS: Hi =0x 00000000____ ; Lo =0x00000006_____
# Case 2: positive x negative = negative:
addi $s2, $zero,2 # $s2=2
addi $s3, $zero,-3 # $s3=-3(= ffff fffd)(2's complement)
mult $s2, $s3 # (2 points) verify with MARS: Hi =0x FFFFFFFF____ ; Lo =0xFFFFFFFA
# Case 3: negative x negative = positive:
addi $s2, $zero,-2 # $s2=-2(= ffff fffe)(2's complement)
addi $s3, $zero,-3 # $s3=-3(= ffff fffd)(2's complement)
mult $s2, $s3 # (2 points) verify with MARS: Hi =0x _________ ; Lo =0x ___________
wait: j wait # wait

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions