Example Data Table
These examples use common normalized values. Zeros are shortened for readability.
| Decimal |
Precision |
Sign |
Exponent |
Fraction starts with |
Meaning |
| 13.625 |
Single |
0 |
10000010 |
1011010000... |
1.101101 × 23 |
| -0.75 |
Single |
1 |
01111110 |
1000000000... |
-1.1 × 2-1 |
| 5.5 |
Half |
0 |
10001 |
0110000000 |
1.011 × 22 |
| 0 |
Any |
0 |
All zeros |
All zeros |
Positive zero |
Formula Used
For a normal finite value, the calculator uses:
value = (-1)^sign × 2^(storedExponent - bias) × (1 + fractionInteger / 2^fractionBits)
The bias is 2^(exponentBits - 1) - 1. A subnormal value uses a stored exponent of zero:
value = (-1)^sign × 2^(1 - bias) × (fractionInteger / 2^fractionBits)
If every exponent bit is one, the value is Infinity when the fraction is zero. It is NaN when the fraction is not zero.
How to Use This Calculator
- Choose decimal conversion or binary pattern conversion.
- Select half, single, double, or custom precision.
- Enter a decimal value, full bit pattern, or separate fields.
- Select a rounding mode for decimal conversion.
- Press Calculate and read the result above the form.
- Use the CSV or PDF buttons to save the answer.
Binary Floating Point in Maths
Binary floating point is a compact way to store real numbers. It is used in calculators, computers, instruments, and simulation tools. The format splits a number into three parts. These parts are the sign, exponent, and fraction. The sign controls positive or negative direction. The exponent sets the scale. The fraction stores the significant digits.
Why the Fields Matter
A decimal number may look simple. Its binary form may be repeating. For example, many tenths cannot be stored exactly in base two. The calculator exposes that issue. It shows the stored pattern, the decoded value, and the error. This helps students see why digital arithmetic can produce small differences. It also helps teachers demonstrate range, precision, and overflow.
Normal and Subnormal Values
Most finite values are normal numbers. They have an implied leading one before the fraction. This saves one bit of storage. Very small values use the subnormal rule. They do not have the implied leading one. This choice allows gradual underflow instead of a sudden jump to zero. It is important in numerical methods, because tiny terms can still affect a final sum.
Rounding and Bias
The exponent is stored with a bias. This lets the field represent positive and negative powers without a separate sign. Rounding decides what happens when extra binary digits do not fit. Nearest even is common. Directed rounding is useful for interval checks and numerical bounds. The calculator lists the chosen rule, so the result is easier to audit.
Practical Study Use
This page supports half, single, double, and custom layouts. You can compare formats quickly. You can decode a bit string from a textbook. You can also test a decimal from an assignment. The exported files make it easier to keep steps with lab notes. Use the formula section to verify each line by hand. Check the binary pattern, then review the hex pattern. Both are useful for debugging programs and memory dumps. Treat very large custom values with care, because browser and server arithmetic still use practical limits. Use small test cases first, then compare larger values against trusted classroom examples before submitting final work carefully.
FAQs
1. What is a binary floating point number?
It is a binary format for storing real numbers. It uses a sign bit, exponent bits, and fraction bits. The exponent scales the value. The fraction stores precision.
2. What does the bias mean?
Bias shifts exponent storage into a nonnegative field. The real exponent equals the stored exponent minus the bias for normal finite numbers.
3. Why are some decimals not exact?
Some decimal fractions repeat in binary. The format has limited fraction bits, so it must round them. That creates a small representation error.
4. What is a subnormal number?
A subnormal number has a zero stored exponent and a nonzero fraction. It represents very small values with reduced precision near zero.
5. What happens when exponent bits are all ones?
All exponent bits set to one mark special values. A zero fraction means Infinity. A nonzero fraction means NaN.
6. Which rounding mode should I use?
Nearest, ties to even is the usual study choice. Directed modes help when you need upper bounds, lower bounds, or truncation behavior.
7. Can I enter a full binary pattern?
Yes. Choose binary fields to decimal. Enter the full pattern, or enter sign, exponent, and fraction fields separately.
8. Does custom precision follow the same formula?
Yes. Custom precision uses the same sign, bias, exponent, and fraction rules. The selected bit counts change the range and precision.