Binary
BASE 2MATH TOOLS
Binary Decimal Hex Converter
Convert those base numbers
Decimal
BASE 10Hexadecimal
BASE 16All conversions are performed only in your browser.
QUICK REFERENCE
decimal, binary and hex 0 to 16 list
| Decimal | Binary | Hexadecimal |
|---|---|---|
| 0 | 00000000 | 0x0 |
| 1 | 00000001 | 0x1 |
| 2 | 00000010 | 0x2 |
| 3 | 00000011 | 0x3 |
| 4 | 00000100 | 0x4 |
| 5 | 00000101 | 0x5 |
| 6 | 00000110 | 0x6 |
| 7 | 00000111 | 0x7 |
| 8 | 00001000 | 0x8 |
| 9 | 00001001 | 0x9 |
| 10 | 00001010 | 0xa |
| 11 | 00001011 | 0xb |
| 12 | 00001100 | 0xc |
| 13 | 00001101 | 0xd |
| 14 | 00001110 | 0xe |
| 15 | 00001111 | 0xf |
| 16 | 00010000 | 0x10 |
HOW IT WORKS
Converting base numbers with JavaScript
This web page uses JavaScript for converting base numbers. JavaScript provides parseInt and toString methods for those purpose.
toString's first param is for converting decimal number to specific base number.
const value = 334;
value.toString(16); // "14e"
parseInt's second param is for converting specific base number to decimal.
parseInt('101001110', 2); // 334
But parseFloat doesnt provide param for converting base number. You have to write some script If you want to convert float from any base number.
I use those script that is in Stackoverflow.
Converting hexadecimal to float in JavaScript – Stack Overflow
This function provide param for converting base number like parseInt.