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

Main result

Grouped binary

Signed binary (two's complement)

Hex with padding

Octal

Derived from the magnitude or two's complement pattern

Automatic steps: repeated division by 2

Dividend Quotient Remainder Step
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.

  1. Clean the input. Remove spaces, underscores, and duplicate signs; keep only digits and an optional leading sign.
  2. Take the magnitude. Work with the absolute value to build the unsigned binary.
  3. Divide by 2. Record the quotient and remainder (0 or 1) on each step.
  4. Iterate. Use the new quotient as the dividend until it reaches 0.
  5. Read backwards. The unsigned binary is the sequence of remainders from last to first.
  6. 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.

0 → 0 1 → 1 5 → 101 13 → 1101 42 → 101010 255 → 1111 1111

Frequently asked questions