Description
Multiply index by entry size for offsetBytes and add base for byteAddress.
Address calculations distinguish an occupied last byte from an exclusive end, and alignment rounds to a defined boundary. Element counts and byte counts are not interchangeable.
Multiply index by entry size for offsetBytes and add base for byteAddress.
When to use this tool
Use Interrupt Vector Byte Offset when you need an explicit address, alignment, page, or transfer-count mapping.
How to use the tool and how it works
- Enter vectorIndex, bytesPerEntry, baseByteAddress. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read offsetBytes, byteAddress. Use the output convention below.
Require nonnegative vectorIndex and baseByteAddress and positive bytesPerEntry. Multiply index by entry size for offsetBytes and add base for byteAddress.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| vectorIndex | Vector Index | Required. Safe integer; minimum 0. |
| bytesPerEntry | Bytes Per Entry | Required. Safe integer; minimum 1. |
| baseByteAddress | Numeric address in the stated address-unit convention; no actual memory is read. | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| offsetBytes | Offset Bytes | Required. Safe integer. |
| byteAddress | Byte Address | Required. Safe integer. |
{
"input": {
"vectorIndex": 7,
"bytesPerEntry": 4,
"baseByteAddress": 256
},
"output": {
"offsetBytes": 28,
"byteAddress": 284
}
} Limitations and assumptions
- All inputs are safe integers but arithmetic remains numeric; memory bounds, device vector layout, alignment, and hardware access are not validated.
- 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 resulting span against actual memory bounds and device-specific access and transfer rules.
References
Similar or alternative tools
- Uart Register Divisor Byte Split
Return floor(divisor/256) as highByte and divisor modulo 256 as lowByte.
- Watchdog Pre Scaler Setting
Deduplicate, select divisors with input/divisor ≤ maximumTickHz, and return the smallest eligible divisor and its tickHz.