MATH TOOLS

Binary Decimal Hex Converter

Convert those base numbers

Choose Input Base Number

Fractions and negative values are supported. You can also use 0b and 0x prefixes.

Binary

BASE 2
0

Decimal

BASE 10
0

Hexadecimal

BASE 16
0

All conversions are performed only in your browser.

QUICK REFERENCE

decimal, binary and hex 0 to 16 list

DecimalBinaryHexadecimal
0000000000x0
1000000010x1
2000000100x2
3000000110x3
4000001000x4
5000001010x5
6000001100x6
7000001110x7
8000010000x8
9000010010x9
10000010100xa
11000010110xb
12000011000xc
13000011010xd
14000011100xe
15000011110xf
16000100000x10

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.