What information entered the process?
Labs / Computer Science
Floating-Point Bits
Every number in a computer is just a pattern of bits. Click the boxes to flip the sign, exponent, and mantissa, or type a target and let it snap to the nearest float it can actually store. Watch where the value lands on the number line — the representable points bunch up near zero and spread apart as they grow.
Labs / Computer Science / Floating-Point Bits
Floating-Point Bits
Every number in a computer is just a pattern of bits. Click the boxes to flip the sign, exponent, and mantissa, or type a target and let it snap to the nearest float it can actually store. Watch where the value lands on the number line — the representable points bunch up near zero and spread apart as they grow.
Why it matters
Why explore this?
Computer science turns clear rules into reliable processes. This model lets you step through those rules and see how each decision changes the result.
Explore
Try the model
Investigate
Questions to test
Predict first, try it in the model, then use what you observe to answer.
What to try
- Snap to 0.1 in half precision. Why is the stored value not exactly 0.1, and what does the error readout say?
- Flip a single exponent bit versus a single mantissa bit. Which one changes the value more, and by how much?
- Drag the value out to 8, then back to near zero. What happens to the gap between neighbouring floats?
- Switch from half to single precision on the same target. How much smaller does the rounding error get, and why?
- Set every exponent bit to 1. Can you make the value show ∞, and then nudge it into NaN?
Explain
Make sense of what happened
Trace the process one step at a time. Name the rule used at each important step, then explain why the final result follows from those rules.
Check
Before you leave
Which rule changed it?
Why did the process produce this result?
If you can answer all three using evidence from the model, you understand the main idea. If not, return to Explore and change one setting at a time.