Examples
-
Decimal
255 -
Hex
0xff -
Binary
0b11111111
About Number Base Converter
Bit flags, color values, memory addresses, and file permissions all get written in different bases depending on context, and converting between them by hand is exactly the kind of arithmetic a computer should do instead.
Paste a number and this detects its base automatically - a `0x` prefix means hex, `0b` means binary, `0o` means octal, otherwise it's read as plain decimal - then shows all four representations side by side.
Uses BigInt internally, so it isn't limited to 32-bit values the way bitwise tricks in plain JavaScript would be.
FAQ
- Does it support negative numbers?
- No - only non-negative integers are supported, since binary/octal/hex representations of negative numbers depend on a bit width and signedness convention this tool doesn't assume.