Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal.

Result —
Conversion —

Torthaí a nuashonrú mar a chlóscríobh tú.

Did this calculator give you the right answer?

Maidir leis an áireamhán seo

number base converter reads the value in the source base, works out its plain decimal value, and reexpresses that value in the target base. It reads your value in the source base, works out its plain decimal value, and reexpresses that value in the target base. It reads your value in the source base, works out its plain decimal value, and reexpresses that value in the target base. It reads your value in the source base, works out its plain decimal value, and reexpresses that value in the target base. It reports the intermediate decimal value so you can check the working.Worked example: the decimal number 255 is 11 in binary and FF in hexadecimal, since 255 = 15×16 + 15.Worked example: the decimal number 255 is 11 in binary and FF in hexadecimal, since 255 = 15×16 + 15.Worked example: the decimal number 255 is 11 in binary and FF in hexadecimal.Worked example: the decimal number 255 is 111 in binary and FF in hexadecimal.Worked example: the decimal number 255 is 111 in binary and FF in hexadecimal.Worked example: the decimal number 255Worked example: the decimal number 255 is 111 in binary and FF in hexadecimal.Worked example: the decimal number 255Worked example: the decimal number 255 is 111 in binary and FF in hexadecimal.Worked example: the decimal number 255Worked example: the decimal number 255 is 111 in binary and FF in hexadecimal.Worked example: the decimal number 255Worked example: the decimal number 255 is 111 in binary and FF in hexadecimal.

Ceisteanna Coitianta

How do I convert decimal to binary?

Repeatedly divide by 2 and read the remainders from bottom to top. For example 10 in decimal is 1010 in binary, and 255 is 11111111.

What is hexadecimal used for?

Hexadecimal (base 16) packs four binary bits into one digit (0–9 then A–F), so it is a compact way to write bytes. The decimal number 255 is FF in hex.

Why does my number show a dash?

The digits must be valid for the source base — for example only 0 and 1 in binary, or 0–9 and A–F in hex. An invalid digit makes the result undefined.

What do the letters A to F mean in hexadecimal?

They are single digits for the values 10 through 15: A is 10, B is 11, up to F which is 15. This lets base 16 fit numbers up to 15 into one place before it has to carry.

Why does each hex digit equal four binary digits?

Because 16 equals 2 to the fourth power, every hexadecimal digit covers exactly four bits. So the byte 11111111 groups into 1111 1111, which is FF — this number base converter does that grouping for you.

Can this converter handle very large numbers?

It works on whole numbers and is accurate up to the range integers are stored exactly (about 9 quadrillion, or 2⁵³). Beyond that, extremely long binary or hexadecimal strings may lose precision in their last digits.

❤️ Grá Calculator.Free? Comhroinn é

𝕏  X Facebook Reddit
API — úsáid an áireamhán seo ó chód

Glaoigh ar an áireamhán seo mar chríochphointe JSON saor in aisce - níl aon eochair ag teastáil. Seol na luachanna réimse thíos mar pharaiméadair cheist nó JSON. Anything you omit uses the same default this page is pre-filled with; an unknown parameter is a 400, never a silent zero. Léigh an doiciméadú iomlán API →

Deireadhphointe

GET https://calculator.free/api/v1/number-base/

curl

curl "https://calculator.free/api/v1/number-base/?amount=255&from=10&to=2"

JavaScript fetch()

const r = await fetch(
  "https://calculator.free/api/v1/number-base/?" + new URLSearchParams({
    "amount": "255",
    "from": "10",
    "to": "2"
  }));
const data = await r.json();
console.log(data.results);

Is meastacháin iad na torthaí le haghaidh treoir ghinearálta amháin, ní comhairle airgeadais, leighis nó cánach.