Skip to main content
Toollyz

Search tools

Search for a command to run...

Decimal to Binary

Convert decimal (integer or float) to binary with a full step-by-step division-by-2 algorithm display. Floats are also encoded as IEEE 754 (single + double precision) showing sign bit, exponent and mantissa. BigInt-backed integer math. 100% offline.

What is the Decimal to Binary?

Decimal to Binary is a focused single-direction converter that emphasises the conversion method, not just the result. Type any decimal number (integer or float, optional sign, supports scientific notation) and the tool shows: the binary representation (optionally grouped in 4-bit nibbles for readability), a step-by-step division-by-2 table (divide, record remainder, repeat until quotient is 0 — read remainders bottom-up for the binary digits), and an IEEE 754 encoder for fractional inputs (single and double precision, with sign bit + exponent + mantissa shown in colour-coded segments). BigInt powers the integer math, so 64+ bit decimal numbers convert without precision loss. The step-by-step display is the same algorithm taught in computer science classes — useful for studying for exams, debugging your own binary arithmetic, or building intuition for how integers map to bits.

How to use it

  1. Type a decimal number — integer or float, scientific notation OK.
  2. Read the binary value at the top, optionally grouped in 4-bit nibbles.
  3. Read the division-by-2 step table: divide, record remainder, repeat.
  4. For floats: read the IEEE 754 encoding showing sign / exponent / mantissa.

Benefits

  • Step-by-step division-by-2 algorithm display — see how binary is derived, not just the answer.
  • BigInt for integer math — arbitrary precision, no rounding errors.
  • IEEE 754 encoder for fractional inputs (32-bit single + 64-bit double precision).
  • Float encoding shows sign bit, exponent (raw + effective), mantissa, and hex form.
  • 4-bit nibble grouping for readability (optional, default on).
  • Float classification: zero / subnormal / normal / infinity / NaN.
  • Accepts integers, decimals, scientific notation (1e6).
  • Negative numbers via leading minus sign (signed magnitude).
  • Runs 100% in your browser — Toollyz has no server.

Frequently asked questions

What's the division-by-2 algorithm?

Divide your number by 2, record the remainder (0 or 1), set the dividend to the quotient, repeat until the quotient is 0. Read the remainders bottom-up — that's your binary representation. It's the standard algorithm taught in CS101.

Why show every step?

Most converters just give you the answer. Showing the steps helps with understanding (great for students), debugging your manual arithmetic, and explaining the result to others.

What's IEEE 754?

The standard for representing floating-point numbers in binary. Almost every CPU and language uses it. Single precision = 32 bits = 1 sign + 8 exponent + 23 mantissa. Double precision = 64 bits = 1 sign + 11 exponent + 52 mantissa. We encode both for fractional inputs.

Does it handle very large numbers?

Yes for integers — BigInt has no fixed maximum. For floats, you're limited to JavaScript's Number precision (~15-17 significant decimal digits).

What about negative numbers?

We use signed magnitude (leading minus sign). `-10` becomes `-1010`. For two's complement of a specific width, you'd need a separate tool — there's no standard 'natural' width to assume.

How is this different from the Hexadecimal Converter?

The Hex Converter shows all four bases at once. This tool is a focused decimal-to-binary view emphasising the conversion algorithm (step-by-step division) and the IEEE 754 float encoding for fractional inputs.

Can I see the IEEE 754 result in hex?

Yes — the float-encoding card shows the hex form alongside the binary bits, so you can quickly cross-reference with a hex dump.

What happens at the boundary of float precision?

Numbers larger than 2^53 lose precision in JavaScript's Number type before they reach our encoder. We accept them as integers (BigInt) but the IEEE 754 encoding may show different bits than you'd expect because the parse already lost precision.

Does scientific notation work?

Yes — `1e6` (one million), `1.5e-3` (one and a half thousandths), and similar. Parse uses JavaScript's parseFloat, so any standard float syntax works.

Why are subnormal floats relevant?

When the exponent encoded is 0 but the mantissa isn't, the float is 'subnormal' — closer to zero than the smallest normal float. They have reduced precision but extend the range. Common in graphics and physics simulations.

Is anything uploaded?

No. Conversion runs entirely in your browser.