Decimal to Binary Calculator
Convert a whole number to binary, plus its hexadecimal and octal forms.
How it works
divide by 2 repeatedly; the remainders, read bottom to top, are the binary digits
To convert a whole number to binary, divide it by 2 over and over, recording each remainder; reading those remainders from last to first spells out the binary digits. Equivalently, subtract the largest fitting power of two at each step. The result is also given in hexadecimal and octal, which pack four and three bits per digit respectively.
Worked example
42 in binary is 101010: it is 32 + 8 + 2, so the 32, 8 and 2 places each hold a 1. In hexadecimal that is 2A and in octal it is 52.
Frequently asked questions
How do I convert a decimal number to binary by hand?
Divide by 2 repeatedly, writing down each remainder. Reading the remainders from last to first gives the binary digits — 42 becomes 101010.
Why does the same number look longer in binary?
Binary has only two digits, so it needs more places to reach the same value. 255 fits in three decimal digits but takes eight binary digits (11111111).
What is a bit?
A bit is a single binary digit, 0 or 1. Eight bits make a byte, which can represent 256 different values — exactly the range 0 to 255.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.