Description
For integer firstExponent and secondExponent in -500..500 return gap=first-second and ratio=2^gap.
A positional representation depends on its radix, digit range, sign convention, and treatment of leading zeros. Ordinary bases use digits from zero through radix minus one, while negative and bijective bases have different conversion rules. A single carry, borrow, or denominator step is distinct from formatting a complete number.
For integer firstExponent and secondExponent in -500..500 return gap=first-second and ratio=2^gap.
When to use this tool
Use Binary Radix Exponent Gap when you need this digit, carry, borrow, sign, width, or denominator component for an explicit radix convention.
How to use the tool and how it works
- Enter firstExponent, secondExponent. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gap, ratio. Use the output convention below.
For integer firstExponent and secondExponent in -500..500 return gap=first-second and ratio=2^gap.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstExponent | First Exponent | Required. Safe integer; minimum -500; maximum 500. |
| secondExponent | Second Exponent | Required. Safe integer; minimum -500; maximum 500. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gap | Signed difference under the stated formula. | Required. Safe integer. |
| ratio | Ratio in the direction and unit convention stated above. | Required. Finite number. |
{
"input": {
"firstExponent": 5,
"secondExponent": 2
},
"output": {
"gap": 3,
"ratio": 8
}
} Limitations and assumptions
- Ratio compares powers of two in the stated first-over-second direction. Bounds keep these powers finite; no actual floating-point values are decomposed and no decimal precision or arbitrary-radix conversion is performed.
- 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
Choose the full conversion or formatting workflow for the intended representation. Keep radix, digit alphabet, leading-zero width, signed-zero handling, and terminating/repeating-fraction assumptions explicit.
References
Similar or alternative tools
- Bijective Radix One Digit Borrow
For positive integer integer and radix in 2..36 return quotient=floor((integer-1)/radix) and digit=((integer-1) modulo radix)+1.
- Integer Radix Negative Zero Policy
Format a safe integer in radix 2–36 with an explicit direct-call negative-zero policy.