Instantly convert numbers between binary (base‑2), decimal (base‑10), hexadecimal (base‑16) and octal (base‑8).Full support for fractional numbers. esential for digital logic, low‑level programming, and numerical analysis.
Binary (base‑2) is the fundamental number system of digital electronics and computing. Every piece of data — text, images, videos — is ultimately stored as sequences of 0s and 1s. Understanding binary, octal, decimal, and hexadecimal conversions is essential for programmers, network engineers, cybersecurity analysts, and hardware designers.
General conversion formula: A number in base b with digits dₖ…d₀ equals Σ dᵢ × bⁱ.
Example: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀
Repeatedly divide the decimal number by 2, recording remainders from bottom to top. For example, convert 13₁₀: 13 ÷ 2 = 6 rem 1; 6÷2=3 rem 0; 3÷2=1 rem 1; 1÷2=0 rem 1 → 1101₂.
Group binary digits in sets of 4 (nibbles) from right, convert each group to hex digit. E.g., 11010111₂ → 1101 0111 → D7₁₆. Reverse for hex to binary.
Group binary by 3 bits: 10 110 111₂ = 267₈. Octal is widely used in Unix file permissions (chmod 755).
Hex is a human-friendly representation of binary, used in memory addresses, color codes (#FFA500), and debugging.
In computing, signed integers are often represented using two's complement. For an 8‑bit system, the range is -128 to +127. This tool converts absolute values; for signed interpretation see the reference below. Bitwise operations (AND, OR, XOR, NOT) operate directly on binary representations and are crucial for low‑level programming, cryptography, and embedded systems.
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
Network engineers convert binary subnet masks to dotted decimal. A mask of /24 corresponds to binary 11111111.11111111.11111111.00000000 = 255.255.255.0. Using our binary converter, you can quickly verify network ranges and CIDR notations. Similarly, MAC addresses are hexadecimal pairs, and converting them to binary helps in understanding OUI and NIC portions.