Description
Parse current, writtenOnes, and clearableMask as width-bounded unsigned decimal integers.
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 current, writtenOnes, and clearableMask as width-bounded unsigned decimal integers.
When to use this tool
Use Microcontroller: Register Write Clear Effect when you need a deterministic fixed-width field or register-state calculation.
How to use the tool and how it works
- Enter current, writtenOnes, clearableMask, width. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Parse current, writtenOnes, and clearableMask as width-bounded unsigned decimal integers. Clear only bits set in both writtenOnes and clearableMask; return next and the previously set bits that were cleared.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| current | Current | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| writtenOnes | Written Ones | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| clearableMask | Clearable Mask | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| width | Width | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.next | Next | Calculated result member: string. |
| result.clearedMask | Cleared Mask | Calculated result member: string. |
{
"input": {
"current": "255",
"writtenOnes": "15",
"clearableMask": "5",
"width": 8
},
"output": {
"result": {
"next": "250",
"clearedMask": "5"
}
}
} Limitations and assumptions
- This models write-one-to-clear bits only; concurrent hardware changes and other register access semantics are omitted.
- Outputs are nested inside result. 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
- Register Read Clear Observation Mask
Parse nonnegative before and clearMask within the specified 1-128-bit width.
- Register Field Reset Value Extractor
Validate field offset and length within a 1-128-bit resetWord.