Toolvito

Works on this device

Numeral System Converter

Convert a number from one base to another and see the steps. The page works with whole numbers, fractions and negative numbers in every base from 2 to 36. It also handles signed binary, BCD, tables, and Greek, Chinese and Japanese numerals.

Enter your values

Works for whole numbers, fractions with a point and negative numbers. The answer is exact.

Your values

Letters stand for the digits above 9: A is 10, B is 11 and so on. You can use a point for a fraction, and a minus sign.

More options

Used when the fraction part does not end in the new base.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

How to use this converter

  1. Choose what you want to convert. For most tasks this is A number between bases 2 to 36.
  2. Type the number and choose the base it is written in and the base you want. The menu Common conversions fills in the bases for you.
  3. Choose Convert. The page shows the result, the same number in binary, octal, decimal and hexadecimal, and the working.
  4. Under More options you can set how many digits to work out after the point, and group the digits for reading.

How base conversion works

  • A base says how many different digits a place can hold. Base 2 (binary) has 0 and 1. Base 16 (hexadecimal) has 0 to 9 and A to F, where A is 10 and F is 15.
  • To decimal: multiply each digit by its place value and add. In base 2 the place values are 1, 2, 4, 8 and so on. After the point they are 1/2, 1/4, 1/8 and so on.
  • From decimal, whole part: divide by the new base again and again. The remainders, read from the last to the first, are the digits.
  • From decimal, part after the point: multiply by the new base again and again. The whole part of each product is the next digit.
  • A fraction that ends in one base may not end in another. 0.1 in decimal is 0.0(0011) in binary: the digits in brackets repeat without end.
  • Binary, octal and hexadecimal: one octal digit is three binary digits and one hexadecimal digit is four binary digits, so you can regroup the binary digits.

Worked examples

Binary 101101 to decimal: 1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 1×1 = 45. In hexadecimal the same number is 2D, and in octal it is 55.

Decimal 45 to binary: 45 ÷ 2 = 22 remainder 1, 22 ÷ 2 = 11 remainder 0, 11 ÷ 2 = 5 remainder 1, 5 ÷ 2 = 2 remainder 1, 2 ÷ 2 = 1 remainder 0, 1 ÷ 2 = 0 remainder 1. Read the remainders from the last to the first: 101101.

Binary 101.011 to decimal: 4 + 1 + 0.25 + 0.125 = 5.375.

The number −45 in two's complement with 8 bits: 45 is 0010 1101. Invert every bit to get 1101 0010 and add 1. The result is 1101 0011, which is D3 in hexadecimal.

2026 in BCD is 0010 0000 0010 0110: one group of four bits for each decimal digit.

1 million is 10 lakh. With Indian grouping it is written 10,00,000.

Signed binary and BCD

  • Two's complement is the usual way to store a negative whole number. With 8 bits the range is −128 to 127. A number outside the range of the chosen width gives an error message and no result.
  • Unsigned uses every bit for the size: 0 to 255 with 8 bits.
  • Ones' complement and sign and magnitude are older codes. Both have two patterns for zero.
  • BCD (8421 code) stores each decimal digit in its own four bits. It is not the same as plain binary: 12 is 0001 0010 in BCD and 1100 in plain binary.

Other numeral systems

  • Greek alphabetic numerals use letters for 1 to 9, 10 to 90 and 100 to 900 and add them. 2026 is ͵βκϛʹ. This page covers 1 to 9,999.
  • Chinese numerals group the digits in fours with 万 and 亿. 2026 is 二千零二十六. The sign 零 marks skipped places. This page covers 0 up to, but not including, 10^12, in simplified and traditional signs.
  • Japanese kanji numerals use the same signs with other habits: 2026 is 二千二十六, with no sign for the skipped place. This page covers 0 up to, but not including, 10^16.
  • Digits of other scripts (Arabic-Indic, Persian and Urdu, Devanagari, Bengali, Gujarati) replace the ten digits one for one.
  • Lakh and crore: 1 lakh is 100,000 and 1 crore is 10,000,000. This option changes how a number is named and grouped. It does not convert money between currencies.

Limits you should know

  • A number can have at most 200 digits before the point and 120 after it. The working uses exact whole-number arithmetic, so long numbers stay exact.
  • The part after the point is worked out to the number of digits you choose, at most 200. If the repeating block is longer than that, the digits are cut off, not rounded, and the result ends with ….
  • Signed binary works with widths from 4 to 128 bits. It does not convert floating-point numbers. See the Decimal Precision Calculator for the bits of a floating-point number.
  • Chinese and Japanese numerals are read back only in the standard written form. Readings such as pinyin or hiragana are not given.
  • Roman numerals have their own page: the Roman Numeral Calculator.
  • This page does not turn text into binary or Base64. Other tools on this site do that.

Related tools