Description
Check invariance under a supplied cyclic left rotation.
Fixed-width arithmetic can wrap, saturate, shift in sign bits or expose discarded bits. Carry, borrow and signed overflow describe different conditions; a local rounding decision or guard/sticky triplet is one part of an arithmetic operation rather than a complete floating-point result.
Check invariance under a supplied cyclic left rotation.
When to use this tool
Use Bitword Cyclic Rotation Period Witness when evaluating the stated shift, arithmetic flag or rounding convention.
How to use the tool and how it works
- Enter word, width, period. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read invariant, rotated. Inspect invariant before interpreting the associated values.
Check invariance under a supplied cyclic left rotation. Require width 1..128, period 1..width and bounded word; rotate left by period modulo width, mask to width and compare with original.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| word | Word | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| width | Width under the stated bit, interval or geometry convention; apply the field-specific units and bounds. | Required. Safe integer; minimum 1; maximum 128. |
| period | Period | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| invariant | Equality under the requested rotation, not a claim that period is the minimal period. | Required. Boolean. |
| rotated | Rotated | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"word": "85",
"width": 8,
"period": 2
},
"output": {
"invariant": true,
"rotated": "85"
}
} Limitations and assumptions
- A passing rotation need not be the minimal period; no divisibility or full symmetry classification is inferred.
- 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
Use a complete arithmetic operation with explicit width, signedness, overflow and rounding policy; keep exact integer text when values exceed ordinary numeric precision.
References
Similar or alternative tools
- Signed Shift Overflow Witness
Return an exact signed left shift and a wrapping witness.
- Arithmetic Right Shift Sign Fill Mask
Return only the sign-fill mask for an arithmetic right shift.