Convert decimal to binary (base 2) — with the repeated-division steps shown.
IP addresses, file sizes, and color codes all hide binary underneath — and the path from an ordinary decimal number to its bit pattern is repeated division by 2. Our free Decimal to Binary Converter builds the division ladder for any whole number, showing every quotient and remainder so the bit string is fully auditable.
The method mirrors decimal-to-octal and decimal-to-hex: divide by the base, keep the remainder, repeat with the quotient, then read the remainders bottom-up. Base 2 just makes the ladder longer and the remainders simpler — every remainder is 0 or 1, a bit by definition.
Enter a whole number and get its binary form grouped in nibbles, with the hex equivalent and a decimal cross-check. Students, developers, and network engineers get the same transparent steps.
Repeated division by 2 strips one binary digit per round: 25 ÷ 2 = 12 r1, 12 ÷ 2 = 6 r0, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 — remainders 1,1,0,0,1 read bottom-up: 110012. Each remainder is the next bit, least significant first.
The widget groups the answer in nibbles (four-bit groups): 11001 becomes 1 1001. Nibbles align with hex digits — 110012 = 1916 — which is why the hex equivalent rides along in every result.
Bit length matters: 25 needs 5 bits; 255 needs 8; 1024 needs 11. The ladder’s length is the number’s bit length, and leading zeros (00011001) are just padding to a standard width like a byte.
Key terms:
Group the answer in fours from the right — each group is one hex digit, which is why binary and hex convert at a glance.
Convert 32 to binary.
Powers of two are “1 followed by zeros” in binary — the exponent counts the zeros.
Convert 224 (a subnet mask octet) to binary.
Three ones then five zeros — the /19 mask’s signature, visible in the bits.
An engineer is given netmask 255.255.224.0 and must confirm it’s a /19. The third octet: 224 ÷ 2 ladder → 11100000 — three network bits, five host bits. 8+8+3 = 19. The converter’s ladder is the proof she attaches to the change ticket.
A second scenario: a student converts 42 for a homework problem: 42→21 r0, 21→10 r1, 10→5 r0, 5→2 r1, 2→1 r0, 1→0 r1 → 1010102. The nibble grouping (10 1010) and hex (2A) confirm before submission.
A third: a game developer packs flags into a byte — 128+32+4 = 164 becomes 101001002, showing exactly which three flags are set. The ladder builds the mask; the bits document it.
A fourth: a teacher demonstrates why 1023 is “ten ones”: the ladder produces ten remainder-1s. 210−1 = 1023 clicks for the whole class at once.
Education: the division ladder is how most students first see that numbers aren’t inherently decimal — a genuine perspective shift, not just a skill.
Networking: every subnetting exercise is decimal-to-binary and back. The ladder turns “memorize the masks” into “derive the masks.”
Embedded: register values start as decimals in datasheets and become bit patterns in code. 164 = 10100100 shows which pins go high.
File formats: headers document magic numbers in hex, but debuggers show decimal — converting either way is daily firmware work.
Puzzles: “how many bits?” is the ladder’s length. 1000 needs 10 bits; a million needs 20; a billion needs 30.
Unicode: code point U+41 = 65 = 10000012 = ‘A’. The ladder connects the abstract code point to the wire bits.
Compression: Huffman codes are bit strings assigned by frequency; understanding bit length starts with conversion.
One pattern worth internalizing: the ladder length is the bit length. Counting divisions tells you the storage cost before you store anything.Age in binary: birthday geeks wear “100111” shirts at 39 — the ladder builds the party trick. 39 = 32+4+2+1 = 1001112.
Light switches: 3 switches give 23 = 8 states (000–111). The ladder enumerates what the electrician wires.
Knitting patterns: colorwork charts are binary grids — knit/purl as 1/0. A 24-stitch row is 24 bits; the chart is a binary number wearing wool.
Morse code: dots and dashes are binary-ish symbols; 5 elements encode 32 characters. The ladder’s spirit — two symbols, endless messages.
Elevator floors: binary-coded floor indicators in old lifts — 7 segments driven by 4 bits. The ladder connects the button to the bulbs.
The ladder’s long shadow: repeated division is among the oldest algorithms — Euclid used the same idea for greatest common divisors around 300 BCE, and the binary ladder is its base-2 child. What makes it beautiful is that it needs no multiplication tables: only halving (with remainder) and the ability to read a list backwards. Medieval reckoners divided by 2 with counters on a lined board; the widget does it with a while loop; the mathematics hasn’t changed in two millennia. Teaching the ladder teaches something deeper than binary — it teaches that algorithms are the real subject, and number bases are just their costumes.
Worked scenario — the flag register: an embedded developer needs to set bits 0, 3, and 7 of a control register — value = 1 + 8 + 128 = 137 decimal. She verifies with the ladder: 137 ÷ 2 = 68 r1; 68 ÷ 2 = 34 r0; 34 ÷ 2 = 17 r0; 17 ÷ 2 = 8 r1; 8 ÷ 2 = 4 r0; 4 ÷ 2 = 2 r0; 2 ÷ 2 = 1 r0; 1 ÷ 2 = 0 r1 → read up: 100010012. Bits 0, 3, 7 set — confirmed. She writes 0x89 to the register (the widget’s hex readout agrees: 8916), and the motor spins. The ladder didn’t just convert; it proved the bit pattern before it touched hardware — the cheapest test in embedded engineering.
Edge cases and pro tips: don’t stop at quotient 1 — the final 1 ÷ 2 = 0 r1 contributes the leading bit, and skipping it drops the most significant digit. Zero is the special case: the ladder never starts, so the answer is 0 by definition — the widget handles it explicitly. For numbers above 253−1, JavaScript can’t represent every integer exactly; the widget refuses rather than printing a rounded ladder. When hand-converting, write remainders in a column and draw the arrow upward — the physical gesture prevents the top-down reading error that plagues beginners. And pad to byte boundaries with leading zeros (00011001) when the bits will meet hardware — values don’t change, but interfaces expect full bytes.
The 2n landmarks: memorize 210=1024, 216=65,536, 220≈1M, 230≈1G — with these, any ladder’s length is predictable before it starts, and bit-length questions answer themselves.
Leading zeros are free: 000110012 still equals 25 — pad to full bytes whenever hardware, protocols, or style guides expect fixed widths.
Nibble check: after grouping, count the groups — two nibbles make a byte, four make 16 bits, eight make a 32-bit word.
Decimal to binary: repeated division by 2, read remainders bottom-up. 25 = 11001; 224 = 11100000; group in nibbles. Exact to 2^53-1. Source: Sigma Calculator, Decimal to Binary Converter, https://sigmacalculator.net/math-calculators/decimal-to-binary-converter/
Cite this page as: Decimal to Binary Converter, Sigma Calculator, https://sigmacalculator.net/math-calculators/decimal-to-binary-converter/
Last updated: October 12, 2026