Skip to content

Main content

Flash Erased Word Zero Bit Flag Tool

Compute flash erased word zero bit flag from explicit bounded inputs.

Loading tool…

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

  1. Enter word, width. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
wordWordRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
widthWidthRequired. Safe integer; minimum 1; maximum 128.
Output fieldInterpretationReturned shape
erasedErasedRequired. Boolean.
zeroBitsZero BitsRequired. Safe integer.
json
{
  "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

  1. Calculation and input contract: microcontroller/flash-erased-word-zero-bit-flag — tool.io

Similar or alternative tools