Register Bit-Field Packer

Lay named fields out across one hardware register word and read back the packed hex, decimal, binary and byte order.

The first field takes the most significant bits, and the last field ends at bit 0. Unused low bits read as zero.

Values are unsigned and may be written as decimal, 0x hex or 0b binary; a value that needs more bits than its field is refused rather than truncated. Fields are packed most significant first, in the order listed, so the widths must add up to no more than the word. Byte rows show the little-endian order as well, which is what a memory dump of the register usually shows on a little-endian CPU. The 64-bit word is calculated exactly with BigInt, so every bit survives. Everything runs in your browser; nothing is sent or stored.