Done

🔢 Decimal ↔ Binary Converter

Convert decimal numbers to binary (base 2), binary to decimal, with step-by-step conversion process and bit grouping every 4/8 digits.

Decimal Input
Results
42
Decimal
101010
6
Bits
1
Bytes
2⁵
Highest power
History
No conversions yet.
Quick Samples
How it works
Decimal → Binary: Repeatedly divide by 2, read remainders bottom-to-top.
Binary → Decimal: Each bit × 2n (right to left, starting n=0).
Signed: Uses 2's complement for negative numbers.

Binary Number System

Base 2 vs Base 10

Computers use binary (base‑2: 0s and 1s) while humans use decimal (base‑10: 0‑9). This converter shows the exact bit pattern computers store for any decimal value.

2's Complement

Negative numbers use 2's complement: invert all bits of positive value, add 1. Example: -5 in 8‑bit = 251 (11111011₂). This handles arithmetic naturally in hardware.

Bit Grouping

Bits are grouped in 4s (nibbles) or 8s (bytes) for readability. 1011 0101 = B5₁₆. Padding adds leading zeros to fixed widths like 8 or 16 bits.