
Converting an IEEE-754 Float To Decimal (in Scientific Notation)
In this video we show step-by-step how to take a floating-point representation (IEEE-754) and convert it to decimal -- which depending on the size of the number may result in an expression in scientific notation. The sign bit simple tells us the overall sign of the number. We take the 8-bit exponent, convert it to decimal, and the "un-bias" it (by subtracting 127). That result will tell us the power_of_two. Next we take the mantissa, we bring back the 1 out front that was not stored. We convert this 24-bit binary number to decimal and divide it by 2^23. The result is number between 1 and 2. Finally putting the pieces together it is (Sign)*(number_between_1_and_2)*2^(power_of_two). We put that into a calculator to achieve a decimal and/or scientific-notation result. Finally we checked the result against an online floating-point number calculator.