Binary Converter
Binary (base-2) is the foundation of all digital computing — every number, image, and file on a computer is ultimately stored as a sequence of 0s and 1s. This converter lets you translate any binary number into decimal, octal, or hexadecimal and shows you every step of the conversion process.
Notes
Understanding Bit Positions
In binary, each digit is called a bit. The rightmost bit is at position 0 and represents 2⁰ = 1. Moving left, each position doubles the value: 2¹ = 2, 2² = 4, 2³ = 8, and so on. A bit that is 1 contributes its full positional value; a bit that is 0 contributes nothing.
| Bit position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Power of 2 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
How to Convert Binary to Decimal
Write down the binary number, identify the position of each 1-bit, look up its power-of-2 value from the table above, and add all those values together.
How to Convert Binary to Octal
Because 2³ = 8, three binary bits map to exactly one octal digit. Group the binary digits into sets of 3 from right to left, padding the leftmost group with leading zeros if needed, then replace each group with its octal digit (0–7).
How to Convert Binary to Hexadecimal
Because 2⁴ = 16, four binary bits map to exactly one hex digit. Group the bits in sets of 4 from right to left, padding if needed, then replace each group with its hex digit (0–9, A–F).
Quick Reference: Decimal 0–15 in All Bases
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
- How Binary Conversion Works — Detailed Notes — Three worked examples, bit-grouping explained, and practical uses
- Binary Conversion Formula Reference — Positional notation formula, variables, and step-by-step examples
Frequently Asked Questions
Why does the binary number system only use 0 and 1?
Digital circuits have two stable electrical states: voltage present (1) and voltage absent (0). Binary maps directly to these two states, making it the natural number system for all digital hardware. Using more states would require more precise and expensive circuitry.
What is the largest number an 8-bit binary number can represent?
An 8-bit number has positions 2⁷ through 2⁰. The maximum is when all bits are 1: 128+64+32+16+8+4+2+1 = 255. This is why one byte (8 bits) holds values 0–255, a fundamental constant in computing.
How many binary digits do I need for a decimal number?
You need ⌈log₂(n + 1)⌉ bits. For decimal 100 you need 7 bits (1100100₂). For decimal 1000 you need 10 bits. A quick rule: every 10 decimal digits needs about 33 bits.
What is the difference between a bit, a nibble, and a byte?
A bit is a single binary digit (0 or 1). A nibble is 4 bits and represents exactly one hex digit (0–F). A byte is 8 bits and can represent values 0–255. Almost all modern storage and networking is measured in bytes.