Checksum Hex Width Parser
Parse an exactly width-padded hexadecimal checksum token into exact decimal text, rejecting high bits beyond an explicit non-nibble bit width.
Description
Parse an exactly width-padded hexadecimal checksum token into exact decimal text, rejecting high bits beyond an explicit non-nibble bit width.
Fixed-width hexadecimal checksum text must have both the expected digit count and a value fitting the bit width.
When to use this tool
Parse an exactly width-padded hexadecimal checksum token into exact decimal text, rejecting high bits beyond an explicit non-nibble bit width.
- Prepare the supplied hex, bits fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter hex, bits. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.checksum. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
For bits 1 to 128, require exactly ceil(bits/4) hexadecimal digits without a prefix. Parse them and reject values at least 2^bits; return decimal-text checksum.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| hex | hex. | Text; at most 8,192 UTF-16 code units, subject to the grammar above |
| bits | bits. | Integer from 1 to 128 inclusive |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.checksum | The checksum value under the stated formula or text convention. |
{
"input": {
"hex": "00A",
"bits": 12
},
"output": {
"result": {
"checksum": "10"
}
}
} Limitations and assumptions
- When width is not a multiple of four, unused high bits must be zero. No payload integrity is verified.
- All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
- JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.
Alternative or Complementary methods
Use the complete specified checksum algorithm and independent test vectors when verifying a payload. Field packing, parameter shape and arithmetic agreement are separate checks; none supplies cryptographic authenticity.
References
Similar or alternative tools
- Checksum Hex Width Formatter
Format an exact unsigned checksum as lowercase hex at explicit bit width, enforcing non-nibble-aligned high-bit limits.
- Checksum Record Width Audit
Audit exact checksum-record integer values against an explicit unsigned bit width; report range failures while rejecting malformed integer spellings.