Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement single precision floating point addition in MIPS assembly language. Pr

ID: 3622197 • Letter: I

Question

Implement single precision floating point addition in MIPS assembly language. Prompt user to input two floating point (decimal) numbers and compute and display the sum.

the program should be able to handle negative numbers as well.

Examples:
Enter a floating-point value: 1
Enter a floating-point value: 1
Sum: 2.000000000000000000

Enter a floating-point value: 2.2
Enter a floating-point value: 1.4
Sum: 3.599999904632568400

Enter a floating-point value: -1.34
Enter a floating-point value: 3.4
Sum: 2.059999942779541000

Enter a floating-point value: 10.5
Enter a floating-point value: 100.2
Sum: 110.69999694824219000


PS. I know what to do. I just don't know what instructions to use! Someone PLEASE help me! i'll rate LIFESAVER!!!!!



AND IF YOUR NAME IS REENA, PLEASE DO NOT ANSWER! STOP WASTING MY KARMA POINTS!!! PLEASE!!!

Explanation / Answer

Dear user, Here is the single precision floating point addition in MIPS assembly language: ###### Data segment ############ .data Prompt1:.asciiz "Enter a floating-point value:" Prompt2:.asciiz "Enter a floating-point value:" Pro_msg: .asciiz "product:" Sum_msg: .asciiz "Sum:" Error_msg:.asciiz "Input Zero" ######## Code segment ######## .text .globl main main: la $a0,prompt1 # display prompt string li $v0,4 syscall li $v0,5 # read 1st integer into $t0 syscall move $t0,$v0 la $a0,prompt2 #display prompt string li $v0,4 syscall li $v0,5 # read 1st integer into $t0 syscall move $t1,$v0 beqz $t2,else beqz $t1,else #calculate product add $t2,$t0,$t1 la $a0,Sum _msg # display prompt string li $v0,4 syscall move $a0,$t2 # output sum li $v0,1 syscall else: la $a0,Error_msg # display prompt string li $v0,4 syscall li $v0,10 # exit syscall