FfirmwarekitEMBEDDED / DEVELOPER TOOLS
> tools / bit_calculator

Bit Calculator.

One value. Every representation. Bits, masks, and byte order.

Inputs stay on your device

01Input

Use 0x, 0b, or 0o prefixes, decimal, or select an explicit input base. Signs and digit separators (_) are accepted. Values stay exact through 64 bits.

02Settings

BASE / WIDTH

Changing width validates the value; overflowing bits are never discarded.

Register bits & field

MSB → LSB per rowUnderlined = selected field

Select an inclusive range. Toggle bits to update every number and byte representation.

Working with numbers, bits, and bytes

HELP / EXAMPLES

HEX, binary, octal, and unsigned/signed decimal show the same fixed-width pattern. At 8 bits, 0xFF is unsigned 255 and signed -1. Negative values use two’s complement. Overflow is rejected.

Bit 0 is least significant. For 0xA5 and field [7:4], the mask is 0x000000F0 at 32 bits, and the extracted value is 10. C expressions use U or ULL for the selected width.

Big-endian stores the most significant byte first. The 32-bit value 0x12345678 is 12 34 56 78 in big-endian and 78 56 34 12 in little-endian. Use “Open in byte order” to transfer the current calculator pattern. Loading a word back sets its width and exact HEX value.

The two workspaces keep their inputs while you switch tabs. Transfers happen when you click a transfer action. Every calculation stays in your browser; reloading starts fresh. The older Number converter, Byte order, and Register & bitmask URLs open the corresponding section of this tool.