Convert decimal numbers to and from binary, hexadecimal and octal, including exact decimal-fraction conversions with repeating-digit detection. Everything runs locally in your browser.
Binary and Decimal
- Binary to Decimal Converter
Convert a binary number to decimal by summing the place values – each 1 bit contributes its power of two.
- Decimal to Binary Converter
Convert a decimal number to binary using repeated division by two – the steps panel lists every division and remainder for your exact input, however large.
- Binary Fraction to Decimal Converter
Convert a binary number with a fractional part (such as 101.
- Decimal Fraction to Binary Converter
Convert a decimal fraction to binary by repeated multiplication by two.
Decimal and Hex
- Decimal to Hex Converter
Convert a decimal number to hexadecimal by repeated division by 16 – remainders above 9 become the letters A-F.
- Hex to Decimal Converter
Convert hexadecimal to decimal by summing place values – each digit is multiplied by a power of 16, with A-F standing for 10-15.
- Hex Fraction to Decimal Converter
Convert a hexadecimal number with a fractional part (such as A.
- Decimal Fraction to Hex Converter
Convert a decimal fraction to hexadecimal by repeated multiplication by 16, with exact detection of repeating hex digits – the float notation used in some language literals.
Decimal and Octal
- Decimal to Octal Converter
Convert a decimal number to octal by repeated division by 8, with every division and remainder shown for your input.
- Octal to Decimal Converter
Convert octal to decimal by summing place values – each digit is multiplied by a power of 8.
- Octal Fraction to Decimal Converter
Convert an octal number with a fractional part (such as 7.
- Decimal Fraction to Octal Converter
Convert a decimal fraction to octal by repeated multiplication by 8, with exact repeating-digit detection instead of silent rounding.
Decimal is where humans reason; machines answer in other bases. These tools translate in both directions — repeated division outbound, place-value sums inbound — with each division and each term shown for your numbers, not canned examples.
Fraction pages detect repeating expansions exactly, the honest answer to why 0.1 misbehaves in binary.
Repeated division and repeated multiplication
Every decimal-to-base conversion on this page uses one of two textbook algorithms. For the integer part you repeatedly divide by the target base and collect the remainders, then read them in reverse order. For the fractional part you repeatedly multiply by the target base and collect the integer parts, reading them in forward order. The steps panel on each tool prints both loops for your actual input, so you can follow every division and every multiplication.
Fractions hide a trap that these tools handle exactly: a decimal fraction only terminates in base two, eight or sixteen when its denominator is a power of two. 0.5 and 0.125 convert cleanly, but 0.1 cannot terminate in binary because ten contains the prime factor five — which is precisely why floating-point arithmetic famously cannot store 0.1 exactly. The converters here detect the repeating digit cycle and mark it, instead of cutting it off and pretending the conversion was exact.