Decimal ↔ Binary Converter
Convert decimal numbers (0–255) to 8‑bit binary. Type a number or click the bits – both update in real time.
Range: 0 to 255 (unsigned 8‑bit)
Click any bit to toggle it – the decimal value updates automatically.
📖 Understanding Binary (Base‑2)
Binary is a number system that uses only two digits: 0 and 1. Every binary digit (bit) represents a power of 2. In an 8‑bit number, the place values (from left to right) are: 128, 64, 32, 16, 8, 4, 2, 1.
🔗 Learn more: Wikipedia – Binary number | Khan Academy – Binary
🧮 How to Convert Decimal to Binary
Repeatedly divide the decimal number by 2 and collect the remainders from bottom to top. Example: 13 decimal → 13÷2=6 rem 1, 6÷2=3 rem 0, 3÷2=1 rem 1, 1÷2=0 rem 1 → read remainders upward: 1101 binary (padded to 8 bits: 00001101).
🧠 Binary in Computing
- Computers use binary because transistors have two states: ON (1) and OFF (0).
- 8 bits = 1 byte, which can represent 256 different values (0–255).
- ASCII characters are stored using binary (e.g., 'A' = 01000001).
- Bitwise operators (AND, OR, XOR) work directly on binary representations.
💡 Pro Tip
In our interactive tool, the leftmost bit (MSB) has value 128, the next is 64, and so on. Click any bit to add or subtract its value from the total. Watch the decimal number change instantly!