Description
Parse a width-bounded unsigned decimal word.
A register mask selects bits within a fixed width. Read-clear and write-one-to-clear semantics describe state transitions that differ from ordinary assignment.
Parse a width-bounded unsigned decimal word.
When to use this tool
Use Flash Erased Word Zero Bit Flag when you need a deterministic fixed-width field or register-state calculation.
How to use the tool and how it works
- Enter word, width. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read erased, zeroBits. Inspect erased before interpreting the associated values.
Parse a width-bounded unsigned decimal word. Mark erased only when all width bits are one and count zero bits within that width.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 | Required. Safe integer; minimum 1; maximum 128. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| erased | Erased | Required. Boolean. |
| zeroBits | Zero Bits | Required. Safe integer. |
{
"input": {
"word": "255",
"width": 8
},
"output": {
"erased": true,
"zeroBits": 0
}
} Limitations and assumptions
- An all-ones word is a supplied erased-state convention, not proof of physical flash health or programmability.
- 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 the device's access semantics and account for concurrent hardware changes before applying a register operation.
References
Similar or alternative tools
- Microcontroller: Register Write Clear Effect
Parse current, writtenOnes, and clearableMask as width-bounded unsigned decimal integers.
- Register Field Reset Value Extractor
Validate field offset and length within a 1-128-bit resetWord.