Skip to content

Main content

IEEE Binary16 Field Joiner

Join explicit IEEE binary16 sign/exponent/fraction fields into exact raw integer pattern text; permits all classes without converting to a JavaScript float.

Loading tool…

Description

Join explicit IEEE binary16 sign/exponent/fraction fields into exact raw integer pattern text; permits all classes without converting to a JavaScript float.

Binary floating-point storage separates sign, biased exponent and fraction fields. Zero and subnormal patterns use a different significand rule from normal values, and reserved exponent patterns represent infinity or NaN. These tools accept exact unsigned raw patterns as decimal integer text, preserving signed-zero and payload evidence without converting the bits into a JavaScript numeric value.

Join explicit IEEE binary16 sign/exponent/fraction fields into exact raw integer pattern text; permits all classes without converting to a JavaScript float.

When to use this tool

Use this tool to join explicit IEEE binary16 sign/exponent/fraction fields into exact raw integer pattern text; permits all classes without converting to a JavaScript float.

How to use the tool and how it works

  1. Enter sign, exponent, fraction using the input definitions below.
  2. Run the operation. Resolve malformed-input errors before interpreting the result.
  3. Read result.pattern. Interpret signs, units, ordering and null values using the rules below.

Validate sign in {0,1}, stored exponent in [0,31] and exact integer fraction in [0,2^10). Join (sign << 15) | (exponent << 10) | fraction and return exact unsigned decimal pattern text.1

Input fieldMeaning and unitsAccepted input
signRaw sign bit: integer 0 or 1.Finite safe integer satisfying the stated bounds.
exponentStored biased exponent field: integer 0 through 31.Finite safe integer satisfying the stated bounds.
fractionExact unsigned stored fraction as decimal integer text, from 0 through 2^10−1.Text, at most 8,192 UTF-16 code units; the stated grammar and narrower limits also apply.
Output fieldInterpretation
resultObject containing the fields below.
result.patternExact unsigned raw bit pattern as decimal integer text.
json
{
  "input": {
    "sign": 0,
    "exponent": 15,
    "fraction": "0"
  },
  "output": {
    "result": {
      "pattern": "15360"
    }
  }
}

Limitations and assumptions

  • All bit classes are allowed, including signed zeros and NaNs; this constructs raw bits rather than converting a decimal numeric value.
  • Pattern width is fixed by the tool name. Supply 0≤pattern<2^width as exact decimal integer text, not hexadecimal text or the represented float’s decimal value. Raw-bit operations preserve payloads without guaranteeing runtime NaN behavior.
  • Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.

Alternative or Complementary methods

Distinguish a raw unsigned bit pattern from the decimal value that pattern represents. Use field join/split operations for exact bit editing and a separate numeric conversion when a runtime floating-point value is required.

References

  1. Tool behavior and example: IEEE Binary16 Field Joiner — tool.io

Similar or alternative tools

  • IEEE Binary16 Field Splitter

    Split an exact unsigned IEEE binary16 integer bit pattern into fields, preserving all NaN payload bits and signed-zero evidence.

  • IEEE Binary32 Field Joiner

    Join explicit IEEE binary32 sign/exponent/fraction fields into exact raw integer pattern text; permits all classes without converting to a JavaScript float.