Reputation: 403
I have a homework assignment as follows:
"Implement half precision floating point addition in MIPS assembly language. Prompt user to input two floating point (decimal) numbers and compute and display the sum.
In half precision format, 16 bits are used to represent a floating point number. The exponent field is 5 bits wide while the significand field has 10 bits.
You will need to convert single precision floating point number to half-precision floating point number and then perform your calculations."
How would I go about converting from single precision floating point to half-precision floating point in MIPS?
Upvotes: 1
Views: 2786
Reputation: 224596
To convert an IEEE-754 32-bit binary floating-point object to 16-bit:
The above was written impromptu; it needs to be checked. Also, it does not contain considerations for signaling exceptions.
Upvotes: 5