Number Converter
Convert numbers between different numeral systems such as binary, decimal, and hexadecimal.
Formula
- binary to decimal: parseInt(value, 2)
- decimal to binary: (value).toString(2)
- decimal to hexadecimal: (value).toString(16).toUpperCase()
- hexadecimal to decimal: parseInt(value, 16)
- binary to hexadecimal: (parseInt(value, 2)).toString(16).toUpperCase()
- hexadecimal to binary: (parseInt(value, 16)).toString(2)
Example Calculations
- 1010 (binary) → 10 (decimal) (parseInt('1010', 2))
- 255 (decimal) → FF (hexadecimal) (255..toString(16).toUpperCase())
- 100 (binary) → 4 (hexadecimal) ((parseInt('100', 2)).toString(16).toUpperCase())
Use Cases
- Used in computer science and programming.
- Converting numbers for various computational tasks.