Use Decimal to Binary Converter

Enter your data below to use the Decimal to Binary Converter

📌 Try these examples:
RESULT

Last updated

The Division-by-2 Method

The classic way to convert a decimal integer to binary by hand is repeated division by 2. Divide the number by 2, record the remainder (0 or 1), then divide the quotient again. Read the remainders from bottom to top to get the binary representation.

Text
Convert 90 to binary:

90 ÷ 2 = 45  remainder 0
45 ÷ 2 = 22  remainder 1
22 ÷ 2 = 11  remainder 0
11 ÷ 2 = 5   remainder 1
 5 ÷ 2 = 2   remainder 1
 2 ÷ 2 = 1   remainder 0
 1 ÷ 2 = 0   remainder 1

Read remainders bottom to top: 1011010
Verify: 64+16+8+2 = 90 ✓

Number Base Systems Compared

BaseNameDigitsPrefixUse case
2Binary0, 10bCPU instructions, bitwise ops
8Octal0–70oUnix permissions (chmod)
10Decimal0–9(none)Human-readable numbers
16Hexadecimal0–9, A–F0xMemory addresses, colors, hashes

Why Hexadecimal Is Preferred Over Binary

Binary is verbose — the number 255 requires 8 digits (11111111). Hexadecimal is a compact shorthand: each hex digit represents exactly 4 binary bits (a nibble). So 0xFF = 1111 1111 = 255. This is why memory addresses, color codes, and hash values are written in hex rather than binary.

Converting between binary and hex is trivial: group binary digits in sets of 4 from the right, then replace each group with its hex equivalent:

Text
Binary:  1010 1111 0011 0101
Hex:      A    F    3    5
Result: 0xAF35

Floating-Point Binary

Decimal fractions don't always convert cleanly to binary. The number 0.1 in decimal is a repeating fraction in binary: 0.0001100110011... (infinite). This is why 0.1 + 0.2 !== 0.3 in JavaScript and most other languages — both values are approximations in IEEE 754 double-precision floating-point format. Use Number.EPSILON comparisons or a decimal library when exact decimal arithmetic matters.

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.