The assignment is to create a MIPS program that demonstrates that the associative law fails in addition for floating point numbers (single or double precision). You only need to demonstrate it for single precision. Remember the associative law is a + (b + c) = (a + b) + c. The program’s output should look something like the following where the xxx’s are the numbers you chose. The resulting numbers may be different than mine depending on your choice of a, b, and c. Using a = xxx, b = xxx, and c = xxx a + (b + c) = 0 (a + b) + c = 1 The key is to have two of the number large (one positively and one negatively but equal in magnitude) floating point numbers and the third floating point number very small in comparison. As a side note, the associative law will also fail for multiplication for floating point numbers, but you do not need to demonstrate that.
Assignment for Computer Architecture
The assignment is to create a MIPS
The program’s output should look something like the following where the xxx’s are the numbers you chose. The resulting numbers may be different than mine depending on your choice of a, b, and c.
Using a = xxx, b = xxx, and c = xxx
a + (b + c) = 0
(a + b) + c = 1
The key is to have two of the number large (one positively and one negatively but equal in magnitude) floating point numbers and the third floating point number very small in comparison.
As a side note, the associative law will also fail for multiplication for floating point numbers, but you do not need to demonstrate that.
Please don't forget to include comments in this code
HI THERE
I AM ADDING ANSWER BELOW
PLEASE GO THROUGH IT
THANK YOU
Trending now
This is a popular solution!
Step by step
Solved in 3 steps