{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"ieee-754-float"},"result":{"entity_type":"calculator","id":"ieee-754-float","calculator_id":"ieee-754-float","canonical_url":"https://tttkmbb.com/developer/ieee-754-float","name":"IEEE 754 Floating-Point Converter","title":"IEEE 754 Converter – Sign, Exponent and Mantissa Bits of a Single or Double Precision Float","category":"developer","category_name":"Developer & IT","tool_name":"convert_ieee_754_float","featured_mcp_tool":false,"description":"Encodes a decimal number as an IEEE 754 binary32 (single) or binary64 (double) value and reports the sign, exponent and mantissa bit fields, the hexadecimal and binary representation, the exact value actually stored and the rounding error.","use_when":"You need the hex or binary encoding of a float, want to see why 0.1 is not exactly representable, or need to classify a value as normal, subnormal, zero or infinity.","do_not_use_when":"You want integer bit patterns (use bitwise-operations or base-converter) or need decimal-to-binary conversion of integers only.","inputs":[{"name":"value","label":"Decimal value","type":"number","required":true,"description":"The number to encode; parsed as a JavaScript double first, then rounded to single precision when precision = single.","example":0.1},{"name":"precision","label":"Precision","type":"enum","required":false,"default":"single","values":[{"value":"single","label":"Single (binary32, float)","aliases":["float","float32","binary32","32"]},{"value":"double","label":"Double (binary64)","aliases":["float64","binary64","64"]}],"description":"IEEE 754 format: 1+8+23 bits (single) or 1+11+52 bits (double).","example":"single"}],"outputs":[{"name":"sign_bit","label":"Sign bit","type":"integer","decimals":4,"description":"0 for positive, 1 for negative."},{"name":"exponent_bits","label":"Exponent bits","type":"string","decimals":4,"description":"The 8 (single) or 11 (double) biased exponent bits."},{"name":"mantissa_bits","label":"Mantissa bits","type":"string","decimals":4,"description":"The 23 or 52 fraction bits (the leading 1 of normal numbers is implicit)."},{"name":"biased_exponent","label":"Biased exponent","type":"integer","decimals":4,"description":"Exponent field as an unsigned integer (bias 127 for single, 1023 for double)."},{"name":"unbiased_exponent","label":"Unbiased exponent","type":"integer","decimals":4,"description":"biased_exponent − bias; subnormals and zero use 2^(1 − bias) instead."},{"name":"significand","label":"Significand","type":"number","decimals":12,"description":"1.fraction for normal numbers (0.fraction for subnormals), so that value = (−1)^sign × significand × 2^exponent."},{"name":"hex","label":"Hexadecimal","type":"string","decimals":4,"description":"All bits as a hex word, e.g. 0x3F800000."},{"name":"binary","label":"Binary","type":"string","decimals":4,"description":"All 32 or 64 bits, sign first."},{"name":"stored_value","label":"Stored value","type":"number","decimals":12,"description":"The value actually representable in the chosen precision (rounded to nearest, ties to even)."},{"name":"stored_value_exact","label":"Stored value (exact decimal)","type":"string","decimals":4,"description":"Exact decimal expansion of the stored binary value."},{"name":"rounding_error","label":"Rounding error","type":"number","decimals":15,"description":"value − stored_value (0 when the input is exactly representable)."},{"name":"classification","label":"Classification","type":"string","decimals":4,"description":"normal, subnormal, zero, infinity or nan."}],"input_schema":{"type":"object","properties":{"value":{"description":"The number to encode; parsed as a JavaScript double first, then rounded to single precision when precision = single.","type":"number","examples":[0.1]},"precision":{"description":"IEEE 754 format: 1+8+23 bits (single) or 1+11+52 bits (double).","type":"string","enum":["single","double"],"default":"single","examples":["single"]}},"additionalProperties":false,"required":["value"]},"output_schema":{"type":"object","properties":{"sign_bit":{"description":"0 for positive, 1 for negative.","type":"integer"},"exponent_bits":{"description":"The 8 (single) or 11 (double) biased exponent bits.","type":"string"},"mantissa_bits":{"description":"The 23 or 52 fraction bits (the leading 1 of normal numbers is implicit).","type":"string"},"biased_exponent":{"description":"Exponent field as an unsigned integer (bias 127 for single, 1023 for double).","type":"integer"},"unbiased_exponent":{"description":"biased_exponent − bias; subnormals and zero use 2^(1 − bias) instead.","type":"integer"},"significand":{"description":"1.fraction for normal numbers (0.fraction for subnormals), so that value = (−1)^sign × significand × 2^exponent.","type":"number"},"hex":{"description":"All bits as a hex word, e.g. 0x3F800000.","type":"string"},"binary":{"description":"All 32 or 64 bits, sign first.","type":"string"},"stored_value":{"description":"The value actually representable in the chosen precision (rounded to nearest, ties to even).","type":"number"},"stored_value_exact":{"description":"Exact decimal expansion of the stored binary value.","type":"string"},"rounding_error":{"description":"value − stored_value (0 when the input is exactly representable).","type":"number"},"classification":{"description":"normal, subnormal, zero, infinity or nan.","type":"string"}}},"formula":"value = (−1)^sign × (1 + mantissa / 2^m) × 2^(biased_exponent − bias) for normal numbers; (−1)^sign × (mantissa / 2^m) × 2^(1 − bias) for subnormals; m = 23, bias = 127 (single) or m = 52, bias = 1023 (double)","method":"Encoding uses a DataView (round-to-nearest-even as specified by IEEE 754-2019). Inputs are JavaScript doubles, so the double path never has a rounding error; the exact decimal is computed with integer arithmetic from the stored bits.","sources":[{"name":"Single-precision floating-point format – IEEE 754 binary32 (Wikipedia)","url":"https://en.wikipedia.org/wiki/Single-precision_floating-point_format","type":"reference","retrieved_at":"2026-09-24"},{"name":"Double-precision floating-point format – IEEE 754 binary64 (Wikipedia)","url":"https://en.wikipedia.org/wiki/Double-precision_floating-point_format","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"1.0 in single precision","inputs":{"value":1,"precision":"single"},"expected":{"sign_bit":0,"biased_exponent":127,"unbiased_exponent":0,"hex":"0x3F800000","exponent_bits":"01111111","mantissa_bits":"00000000000000000000000","stored_value":1,"rounding_error":0,"classification":"normal"},"url":"https://tttkmbb.com/api/v1/calculate/ieee-754-float?value=1&precision=single"},{"name":"0.1 in single precision","inputs":{"value":0.1,"precision":"single"},"expected":{"hex":"0x3DCCCCCD","biased_exponent":123,"unbiased_exponent":-4,"stored_value":0.100000001490116,"stored_value_exact":"0.100000001490116119384765625","mantissa_bits":"10011001100110011001101","rounding_error":-1.4901161193847655e-9,"classification":"normal"},"url":"https://tttkmbb.com/api/v1/calculate/ieee-754-float?value=0.1&precision=single"}],"faq":[{"q":"Why is 0.1 stored as 0.100000001490116?","a":"0.1 has an infinite binary expansion (0.000110011…), so it is rounded to the nearest of the 2^23 fractions available at that exponent; the error of about 1.49 × 10⁻⁹ is the rounding_error output."},{"q":"What is a subnormal number?","a":"A value with exponent field 0 and a non-zero mantissa: it is scaled by 2^(1 − bias) without the implicit leading 1, filling the gap between zero and the smallest normal number (1.18 × 10⁻³⁸ for single)."},{"q":"Can I enter infinity or NaN?","a":"Not directly (inputs must be finite), but values beyond 3.4 × 10³⁸ overflow to infinity in single precision and are classified as such."}],"tags":["ieee 754","float to hex","floating point converter","single precision","double precision","mantissa exponent"],"related":[{"calculator_id":"bitwise-operations","reason":"Manipulate the resulting bit pattern."},{"calculator_id":"base-converter","reason":"Convert the hex word to binary or decimal."},{"calculator_id":"scientific-notation","reason":"Decimal scientific notation of the same value."}],"links":{"html":"https://tttkmbb.com/developer/ieee-754-float","markdown":"https://tttkmbb.com/developer/ieee-754-float.md","json":"https://tttkmbb.com/developer/ieee-754-float.json","api":"https://tttkmbb.com/api/v1/calculate/ieee-754-float","schema":"https://tttkmbb.com/api/v1/calculators/ieee-754-float","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T03:45:03Z","next_actions":[{"tool":"run_calculator","calculator_id":"ieee-754-float","reason":"Run IEEE 754 Floating-Point Converter with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/developer/ieee-754-float.md"}}