Register decoder
Decode a 32-bit hardware register into named bit fields, with your own layout or a preset. Runs entirely in the browser.
Type a register value in hexadecimal, describe its fields as name high:low (one per line), and see every field in hex, decimal and binary. Nothing leaves your browser.
Up to 8 hex digits, with or without 0x.
Example: MODE 5:2. A single bit can be written as FLAG 7.
Decoded fields
| Field | Bits | Hex | Decimal | Binary |
|---|---|---|---|---|
| EN | 0 | 0x1 | 1 | 1 |
| TXEN | 1 | 0x1 | 1 | 1 |
| RXEN | 2 | 0x0 | 0 | 0 |
| PARITY | 4:3 | 0x3 | 3 | 11 |
| STOP | 5 | 0x0 | 0 | 0 |
| BAUD_DIV | 15:8 | 0x2A | 42 | 00101010 |
| IRQ_MASK | 19:16 | 0x3 | 3 | 0011 |
How it works#
A field name 7:4 is the value (register >> 4) & 0xF. Bit 0 is the least significant bit, and a single bit can be written as name 3 or name 3:3. Overlapping fields are allowed, since some registers alias the same bits in different views.
The decoder is a plain client component, with no server round trip. That is the model for future demos: static page, client-side logic.