This simulation project is a stand-alone IEEE-754 Binary-64 Floating Point Converter. The project was made using Python and using tkinter library for the GUI.
- Martinez, Michelle Andrea H.
- Rojo, Kate Lynn M.
- Romblon, Kathleen Mae V.
- Tipon, Joshua Emmanuel G.
IEEE-754 Binary-64 floating point converter (including all special cases)
- Input: (1) binary mantissa and base-2 (i.e., 101.01x25) (2) Decimal and base-10 (i.e. 65.0x103). Also should support special cases (i.e., NaN).
- Output: (1) binary output with space between section (2) its hexadecimal equivalent (3) with option to output in text file.
- Stand-alone with GUI (graphics user interface) using a library in python called tkinter
- Python
Run .bat file for easier downloading of the libraries used and to run the app
Try the app -- do different test cases
Print the result
- Error-catching different ways of writing positive numbers.
- Although it sounds simple enough, one of the challenges that the team encountered while creating the app was the many different ways a user can write positive numbers. Thankfully, this problem was caught during the testing phase and solved by integrating it into the current data validation conditions.
- Implementing special cases
- The hardest part that the team encountered was the implementation of special cases, although they may sound simple enough, given that these are values that have their own specific format. For some reason, it was difficult to catch these cases when we were following the process of converting to IEEE-754 Binary-64 format.
- Converting Decimal fractions to Binary
- Another problem that the team encountered while creating the project was the proper way of converting decimal fractions to binary. During initial testing of the conversion, it seemed that the fraction converted correctly but looped multiple times. We tried converting the mantissa and the decimal exponent separately first, but this gave inaccurate results. Instead, we decided to transform the given decimal input so that the exponent in the scientific notation becomes 0, and this number will then be converted to binary and finally normalized.
- Converting Decimal exponent 10^n to its equivalent binary exponent 2m
- The team was also challenged to convert the decimal exponent directly to its equivalent binary exponent. The team searched different math and CS forums for a formula, but most were derivations that resulted in an approximation. It would’ve been fine, given that the approximations were more or less close enough to the actual exact supposed conversion. Sadly, it greatly affected the answer, and thus, the team had to look for a more concrete solution, which ended up converting the whole thing into binary instead and then normalizing the result.
- Radio buttons using Tkinder
- During the creation of the GUI, there was an agreement regarding the use of radio buttons to choose between binary and decimal input and how their respective text boxes and text must appear depending on which was clicked. This proved to be a bit tricky to implement since Tkinter was an old GUI library and wasn’t really intuitive.
- Implementing the normalization function
- In implementing the normalization function, the group experienced a problem getting the expected exponent, as there were instances wherein the exponent outputs were lacking or in excess of 1. However, the team was able to resolve this issue through a bit of tinkering and analyzing.