Number base converter
Type in any box and the others update. Binary, octal, decimal, hex, or any base up to 36. Handy for programming and Class 11–12 computer science.
Details
How decimal → binary works
Number bases in short
A number base is how many different digits are used. Decimal (base 10) uses 0–9. Binary (base 2) uses only 0 and 1, which is how computers store everything. Octal uses 0–7, and hexadecimal uses 0–9 plus A–F, where A is 10 and F is 15. One hex digit is exactly 4 binary digits, so hex is a short way to write binary.
How do I convert decimal to binary by hand?
Keep dividing by 2 and write down each remainder. Then read the remainders from bottom to top. The working on the right shows each step for your number.
Can I enter negative numbers or prefixes like 0x?
Yes. Start with a minus sign for negative numbers. Prefixes 0x, 0b and 0o are accepted and ignored, as are spaces and underscores.
Is there a size limit?
No practical limit. Whole numbers of any length are converted exactly. Fractions aren't supported.