Number Base Converter
Convert whole numbers between binary, hex, decimal, octal and any base, with two's complement.
- Bits needed
- 8
- 16-bit two's complement (hex)
- 00 FF
- 16-bit two's complement (binary)
- 0000 0000 1111 1111
- Read as signed 16-bit
- 255
Number Base Converter FAQ
How do I convert binary to decimal?
Type the binary number in the Binary field. The Decimal field shows the value at once, for example 1111 1111 is 255.
How do I convert a negative number to hexadecimal?
Type it with a minus sign, for example -42. The Hexadecimal field shows -2A, and the details below show the two's complement for the chosen width: FF D6 at 16 bits.
What is two's complement?
It is how computers store negative whole numbers: the value is 2 to the power of the bit width plus the negative number. So -1 in 8 bits is 1111 1111 (FF), and -128 to 127 fit in 8 bits.
Can it convert very large numbers?
Yes. Numbers of any length are converted exactly, for example 18446744073709551615 is FFFFFFFFFFFFFFFF, with no rounding.
Is my input sent anywhere?
No. The conversion runs in your browser and nothing is uploaded.