8 Bit Floating Point Guide
What This Calculator Does
Eight bit floating point numbers are tiny numeric formats. They store a sign, an exponent, and a fraction. The small size makes them useful for lessons, experiments, and low precision machine learning demos. This calculator lets you encode a decimal value or decode an existing bit pattern. You can change exponent bits, bias, rounding mode, subnormal handling, and special value support. That makes the tool flexible for many classroom and testing cases.
Why The Format Matters
A floating point value is not stored like a normal integer. It is scaled by a power of two. The exponent chooses that scale. The fraction stores the leading precision. With only eight bits, every bit has strong impact. More exponent bits give a wider range. More fraction bits give better precision. This tradeoff is the main lesson behind the format.
Rounding And Error
Most decimal values cannot fit exactly. The calculator rounds the scaled significand. It can use nearest even, toward zero, floor, or ceiling. After rounding, the decoded value is compared with the original value. The absolute error shows the real difference. Relative error shows the difference against the input size. These outputs help explain why small formats lose detail.
Special Cases
The tool can reserve the all ones exponent for infinity and NaN. This follows the usual floating point idea. It can also allow subnormal numbers. Subnormals keep small values from dropping straight to zero. They use an exponent field of zero and no hidden leading one.
How To Use The Results
Read the sign bit first. Then check the exponent field. Finally review the mantissa field. The binary byte and hex value show the stored code. The decoded value shows what the byte means. The steps explain the scaling process. Use the example table to compare common patterns. Export the result when you need records for notes, tests, or reports.
Practical Tips
Choose four exponent bits and three fraction bits for a balanced example. Increase exponent bits when range matters more. Increase fraction bits when precision matters more. Use nearest even for general work. Use other rounding modes to study edge behavior. Always compare the encoded value with the decoded value.