Type a number with an optional 0b, 0o or 0x prefix (or pick its base) and see it in all four bases. Large numbers are exact because the conversion uses arbitrary-precision integers.
How it works
Each digit in base b is worth b times the digit to its right: 0xFF = 15 × 16 + 15 = 255.
One hex digit is exactly four binary digits, which is why hex is the usual shorthand for bytes: 0xFF is 1111 1111.
Negative numbers are shown with a minus sign, not in two's complement, because two's complement depends on the word size (8, 16, 32 or 64 bits).
Examples
0xFFDecimal: 255
Hex: 0xFF
Octal: 0o377
Binary: 0b11111111
Bits: 8These examples are run by the tool itself in our automated tests, so the results shown are what it really returns.
Guides that use this
More tools
Legal entity
Devansh Yadav
Moradabad, Uttar Pradesh
Governing law: Courts at Moradabad, Uttar Pradesh
Phone: +91 8433475698
Legal: legal@analyzeit.in