How this works. The value is parsed in the chosen base, then masked to the
selected word width — the same truncation a fixed-width register performs. Under
Signed, a leading 1 means the value is stored in two's complement, so the decimal
reading is
value − 2n:
0xFF at 8 bits is 255 unsigned but
−1 signed. Byte-swapped shows the same word with byte order reversed, which is what you get
reading little-endian data as big-endian. Prefixes (
0x,
0b,
0o), spaces and underscores in the input are ignored.
The value entered is wider than the selected word width, so the high bits have been discarded — exactly as an assignment to a narrower type would.