Convertisseur décimal → binaire
Convertis le décimal en binaire avec BigInt, padding configurable et complément à deux. Vois les divisions successives étape par étape + sorties hex et octal.
Calculatrice décimal en binaire en ligne (étapes)
Convertissez un décimal en binaire avec BigInt, ajoutez du padding personnalisé, récupérez les équivalents en hex/octaux et consultez les divisions successives. Tout est empilé verticalement pour un flux sans distractions.
Binary
Grouped binary
Signed binary (two's complement)
Hex with padding
Octal
Automatic steps: repeated division by 2
| Dividend | Quotient | Remainder | Step |
|---|
How to convert decimal to binary
The manual method divides by 2 repeatedly and stores the remainders; they are read in reverse order. For negative numbers, apply two's complement with the chosen bit width.
- Clean the input. Remove spaces, underscores, and duplicate signs; keep only digits and an optional leading sign.
- Take the magnitude. Work with the absolute value to build the unsigned binary.
- Divide by 2. Record the quotient and remainder (0 or 1) on each step.
- Iterate. Use the new quotient as the dividend until it reaches 0.
- Read backwards. The unsigned binary is the sequence of remainders from last to first.
- Two's complement. If the decimal is negative and you pick a bit-width n, pad the magnitude to n bits, flip all bits, and add 1. If the magnitude does not fit in n bits, you'll be prompted to increase the width.
Positive example (10973): successive divisions produce remainders 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1; in reverse order they form 101010010110101.
Negative example (-25) with 8 bits: the magnitude is 11001, padded to 00011001, inverted to 11100110, and adding 1 gives 11100111.