This program will convert a floating point decimal number into its corresponding IEEE754 representations in 64, 32, and 16 bits.
No assembly language programming was used. This program is 100% C++.
activeprofessor@Abigail:~/FG/Software/Software-final/Convert-decimal-to-IEEE754$ sh run.sh
rm: cannot remove '*.o': No such file or directory
rm: cannot remove '*.out': No such file or directory
Compile the source file conversion.cpp with g++
Link system module to conversion.o to create an executable file: conv.out
Execute the program that converts decimal input into IEEE754 output
Please enter a floating point number using decimal digits: 105.7
You entered: 105.7000000000
Here are the facts about that number using 3 storage sizes: 64, 32, and 16 bits:
|------------|------------------|------------------|-----------------
|Storage size|Memory Location |IEEE 754 value |Decimal value
|------------|------------------|------------------|-----------------
| 64 bits |0x000x7ffff4082968|0x405a6ccccccccccd|105.700000000000003
|------------|------------------|------------------|-----------------
| 32 bits |0x000x7ffff4082964|0x42d36666 |105.69999695
|------------|------------------|------------------|-----------------
| 16 bits |0x000x7ffff4082962|0x569b |105.6875
|------------|------------------|------------------|-----------------
That's all. Have fun with your floats.
This bash script will now terminate.
activeprofessor@Abigail:~/FG/Software/Software-final/Convert-decimal-to-IEEE754$