Converting between number bases
Computers work in binary (base 2), while developers often read hexadecimal (base 16) for memory addresses, colors and byte values, and octal (base 8) for Unix file permissions. This converter keeps all representations in sync. Edit any field and the others update immediately.
- Prefixes like
0b,0oand0xare accepted, and so are_or space separators (1111_0000). - Numbers can be arbitrarily large and negative, because the tool uses JavaScript
BigIntso precision is never lost. - Use custom base for anything from base 2 to base 36.
Two’s complement
Signed integers are stored in two’s complement. The panel shows the exact bit pattern of a number in 8, 16, 32 or 64 bits. For example, -1 in 8 bits is 11111111 (0xff).