Base-N Number Converter
Convert signed integers between binary, octal, decimal, hexadecimal and any supported base from 2 to 36.
Binary to Gray Code
Convert a binary integer to reflected binary Gray code, in which adjacent values differ by only one bit.
Gray Code to Binary
Decode a Gray-code bit string into its corresponding binary number and decimal value.
Decimal to BCD Converter
Encode each decimal digit separately as a four-bit Binary-Coded Decimal (BCD) nibble. This is different from ASCII encoding.
IEEE 754 Float Converter (32-bit)
Inspect the IEEE 754 single-precision representation of a number: sign bit, 8-bit exponent, 23-bit fraction and full bit pattern.
8-bit Two's Complement Decoder
Interpret an 8-bit pattern as a signed two's-complement integer. The most significant bit indicates the sign.
How these number tools work
Each tool represents numbers in a different way. Choose the right representation for your programming, mathematics, digital electronics or computer-science task.
- Base-N: uses positional notation, with digits 0–9 and A–Z for bases above 10.
- Gray code: converts between ordinary binary and reflected binary Gray code.
- BCD: encodes every decimal digit independently using four bits.
- IEEE 754: stores a single-precision value as one sign bit, eight exponent bits and 23 fraction bits.
- Two's complement: represents signed integers using a fixed-width binary pattern.
Frequently asked questions
Can I convert hexadecimal to binary?
Yes. Select base 16 as the input base and base 2 as the output base in the Base-N converter.
Is Gray code the same as binary?
No. Gray code is a different encoding of integer values. Consecutive values in reflected binary Gray code differ by one bit.
Is BCD the same as ASCII?
No. BCD encodes each decimal digit as a four-bit group. ASCII represents text characters using character codes, conventionally seven bits or stored in eight-bit bytes.
Why can the IEEE 754 result differ from the input?
Many decimal fractions cannot be represented exactly in binary floating point. A 32-bit single-precision value may therefore be rounded to the nearest representable value.
Are my numbers sent to a server?
The conversions on this page run in your browser using JavaScript; the tool code does not submit the entered values to a conversion API.