Skip to content

Main content

Information: Kraft Single Codeword Term Tool

Compute one radix^-length Kraft-sum term for an explicit codeword length; a single term does not certify a whole codebook.

Loading tool…

Description

Return exp(-length × ln(radix)) for integer length 0-1000 and radix at least two.

A prefix-free code prevents any distinct codeword from beginning with another complete codeword. Kraft terms describe length budgets, while actual prefix relationships depend on the codewords themselves.

Return exp(-length × ln(radix)) for integer length 0-1000 and radix at least two.

When to use this tool

Use Information: Kraft Single Codeword Term when you need one prefix relationship or code-length contribution.

How to use the tool and how it works

  1. Enter length, radix. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Return exp(-length × ln(radix)) for integer length 0-1000 and radix at least two.1

Input fieldMeaning and unitsAccepted input
lengthLength, count, or code length under the stated domain and unit convention.Required. Safe integer.
radixRadixRequired. Safe integer.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.kraftContributionKraft ContributionCalculated result member: number.
json
{
  "input": {
    "length": 3,
    "radix": 2
  },
  "output": {
    "result": {
      "kraftContribution": 0.125
    }
  }
}

Limitations and assumptions

  • This is one Kraft contribution, not a codeword or complete sum; large lengths and radices may underflow to zero.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Validate the complete codebook and alphabet before making a decoding or feasibility claim.

References

  1. Calculation and input contract: information/kraft-single-codeword-term — tool.io

Similar or alternative tools