When this guide is useful
Users who want to convert between binary, decimal, and hexadecimal numbers, and calculate from hexadecimal to decimal, two's complement, and negative numbers can learn how to choose the correct base and bit width.
- Check program flag values in binary
- Convert hexadecimal numbers of RGB colors and addresses to decimal numbers
- Interpret register value as signed two's complement
Convert
- Input
- Prefixes such as 0b, 0o, 0x, etc.
- Additional information for this feature.
- Bit width such as 8, 16, 32, 64bit
Steps for converting decimal numbers
- Input
- Select the radix and display format you want to output.
- Additional information: 2
- Copy
Additional information: 2
Additional information: 16 8bit FF 255 2 -1
The bitwise representation of decimals and floating-point numbers has different rules than the base conversion of integers. Please check the type of target data first.
Specific example: Comparing 8bit FF with signed/unsigned
FF represents 255 in hexadecimal, but in an 8-bit signed 2's complement number, the most significant bit is the sign, which is -1.
Additional information for this feature.
- Input
- Enter FF.
- Check the 8bit unsigned result.
- Result
Additional information: 16 8bit
Frequently asked questions
- Can I convert it even if I add 0x or 0b?
- Settings
- Additional information for this feature.
- Integers are converted using BigInt, but be careful of the practical number of digits and the browser's processing limit.
Try It in Your Browser
Your input is processed entirely in your browser. Keep the original data, review the output, and only then save or share it.
Open the decimal conversion tool