SlideShare una empresa de Scribd logo
1 de 1
Descargar para leer sin conexión
using mips assembly language Write and test a MIPS function to do single-precision floating-
point multiplication using only integer instructions. The function fmul should receive its
parameters in $a0 and $a1 (as single-precision floating-point numbers) and produce its result in
$v (as single-precision float). You cannot use the floating-point multiply instruction mul.s to do
the multiplication. Only integer instructions are allowed. Extract the fields, multiply, normalize,
round, and pack the final result in $v0. You should also make sure to handle special cases: Zero,
infinity, and NaN - Overflow and underflow Round the result to the nearest even, which is the
default rounding mode in IEEE 754 standard. This is the only rounding mode that should be
supported. Write a main function to input two floating-point numbers and move their values into
$a0 and $a. It should then call the fmul function to compute and return the floating-point product
in $v0. Move the floating-point product in $v0 into floating-point register $f12 and print it. Then
use the mul.s instruction to compute the floating-point product and print it. Compare the two
results to ensure the correctness of the fmul function. A sample run should look as follows.
Allow the user to repeat the execution of the program. Enter 1st float: 5.2e12 Enter 2nd float:
7.3e+13 Result of fmul: 379.6 Result of mul.s: 379.6 Repeat (Y/N)?

Más contenido relacionado

Más de sales87

Use the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdfUse the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdf
sales87
 
Use the pervious question to answer question 4. Suppose that in car.pdf
Use the pervious question to answer question 4.  Suppose that in car.pdfUse the pervious question to answer question 4.  Suppose that in car.pdf
Use the pervious question to answer question 4. Suppose that in car.pdf
sales87
 
Use the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdfUse the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdf
sales87
 
Use the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdfUse the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdf
sales87
 
Use este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdfUse este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdf
sales87
 
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdfUsando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
sales87
 

Más de sales87 (20)

Using Martelle�s Chapters 12-14, please describe the impact of WWII .pdf
Using Martelle�s Chapters 12-14, please describe the impact of WWII .pdfUsing Martelle�s Chapters 12-14, please describe the impact of WWII .pdf
Using Martelle�s Chapters 12-14, please describe the impact of WWII .pdf
 
Using htmljscss, recreate the sliders. I have attached all images..pdf
Using htmljscss, recreate the sliders. I have attached all images..pdfUsing htmljscss, recreate the sliders. I have attached all images..pdf
Using htmljscss, recreate the sliders. I have attached all images..pdf
 
using financial calculatorusing fi.pdf
using financial calculatorusing fi.pdfusing financial calculatorusing fi.pdf
using financial calculatorusing fi.pdf
 
Using a Blackjack game that has the classesentities Blackjack, Card.pdf
Using a Blackjack game that has the classesentities Blackjack, Card.pdfUsing a Blackjack game that has the classesentities Blackjack, Card.pdf
Using a Blackjack game that has the classesentities Blackjack, Card.pdf
 
Using an Arduino microcontroller to code the following projectDet.pdf
Using an Arduino microcontroller to code the following projectDet.pdfUsing an Arduino microcontroller to code the following projectDet.pdf
Using an Arduino microcontroller to code the following projectDet.pdf
 
Use the internet to find an example of a chart or graph.Insert an .pdf
Use the internet to find an example of a chart or graph.Insert an .pdfUse the internet to find an example of a chart or graph.Insert an .pdf
Use the internet to find an example of a chart or graph.Insert an .pdf
 
Use The Wobblies video as a guide httpswww.youtube.comwatchv.pdf
Use The Wobblies video as a guide httpswww.youtube.comwatchv.pdfUse The Wobblies video as a guide httpswww.youtube.comwatchv.pdf
Use The Wobblies video as a guide httpswww.youtube.comwatchv.pdf
 
Use the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdfUse the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdf
 
Use the Plan X and Plan Y tax schemes to complete the following tabl.pdf
Use the Plan X and Plan Y tax schemes to complete the following tabl.pdfUse the Plan X and Plan Y tax schemes to complete the following tabl.pdf
Use the Plan X and Plan Y tax schemes to complete the following tabl.pdf
 
Use the pervious question to answer question 4. Suppose that in car.pdf
Use the pervious question to answer question 4.  Suppose that in car.pdfUse the pervious question to answer question 4.  Suppose that in car.pdf
Use the pervious question to answer question 4. Suppose that in car.pdf
 
Use the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdfUse the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdf
 
Use the phylogeny below to determine whether each statement is true .pdf
Use the phylogeny below to determine whether each statement is true .pdfUse the phylogeny below to determine whether each statement is true .pdf
Use the phylogeny below to determine whether each statement is true .pdf
 
Use the input function to ask the user for a positive, whole number..pdf
Use the input function to ask the user for a positive, whole number..pdfUse the input function to ask the user for a positive, whole number..pdf
Use the input function to ask the user for a positive, whole number..pdf
 
Use the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdfUse the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdf
 
Use este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdfUse este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdf
 
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdf
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdfUsar su autoridad y poder formal para resolver un conflicto, mientra.pdf
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdf
 
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdfUsando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
 
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdfUsando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
 
URGENTAssignment 3 - Software DesginPauline is considering how.pdf
URGENTAssignment 3 - Software DesginPauline is considering how.pdfURGENTAssignment 3 - Software DesginPauline is considering how.pdf
URGENTAssignment 3 - Software DesginPauline is considering how.pdf
 
Uscinski and his co-authors describe how belief in political conspir.pdf
Uscinski and his co-authors describe how belief in political conspir.pdfUscinski and his co-authors describe how belief in political conspir.pdf
Uscinski and his co-authors describe how belief in political conspir.pdf
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

using mips assembly language Write and test a MIPS function to do si.pdf

  • 1. using mips assembly language Write and test a MIPS function to do single-precision floating- point multiplication using only integer instructions. The function fmul should receive its parameters in $a0 and $a1 (as single-precision floating-point numbers) and produce its result in $v (as single-precision float). You cannot use the floating-point multiply instruction mul.s to do the multiplication. Only integer instructions are allowed. Extract the fields, multiply, normalize, round, and pack the final result in $v0. You should also make sure to handle special cases: Zero, infinity, and NaN - Overflow and underflow Round the result to the nearest even, which is the default rounding mode in IEEE 754 standard. This is the only rounding mode that should be supported. Write a main function to input two floating-point numbers and move their values into $a0 and $a. It should then call the fmul function to compute and return the floating-point product in $v0. Move the floating-point product in $v0 into floating-point register $f12 and print it. Then use the mul.s instruction to compute the floating-point product and print it. Compare the two results to ensure the correctness of the fmul function. A sample run should look as follows. Allow the user to repeat the execution of the program. Enter 1st float: 5.2e12 Enter 2nd float: 7.3e+13 Result of fmul: 379.6 Result of mul.s: 379.6 Repeat (Y/N)?