Bit Calculator.
One value. Every representation. Bits, masks, and byte order.
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 / WIDTHChanging width validates the value; overflowing bits are never discarded.
Register bits & field
Select an inclusive range. Toggle bits to update every number and byte representation.
01Input
HEX is formatted as uppercase byte pairs as you edit. Non-HEX characters are ignored; 0x prefixes are accepted. Keep transport headers outside the input.
8 bytes · limit 64 KiB
02Settings
WORD / ORDERReverse bytes inside each word, preserving word order. Complete words are required; 8-bit words contain one byte and keep their order.
Load any input word into Numbers & bits to inspect or edit it.
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.