Description
Return only the sign-fill mask for an arithmetic right shift.
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.
Return only the sign-fill mask for an arithmetic right shift.
When to use this tool
Use Arithmetic Right Shift Sign Fill Mask when evaluating the stated shift, arithmetic flag or rounding convention.
How to use the tool and how it works
- Enter width, shift, negative. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read fillMask. Use the output convention below.
Return only the sign-fill mask for an arithmetic right shift. Require width 1..128 and shift in [0,width]; negative fills the highest shift bits with ones, otherwise return zero.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| width | Width under the stated bit, interval or geometry convention; apply the field-specific units and bounds. | Required. Safe integer; minimum 1; maximum 128. |
| shift | Shift | Required. Safe integer; minimum 0. |
| negative | Negative | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| fillMask | Fill Mask | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"width": 8,
"shift": 3,
"negative": true
},
"output": {
"fillMask": "224"
}
} Limitations and assumptions
- This is the fill component without shifting an actual word; full-width and zero shifts are explicitly allowed.
- 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
- Bitwise: Word Shift Out Bit Mask
Return bits shifted out of one word.
- Signed Shift Overflow Margin
Return exact shifted integer and signed-range margin.