Binary Converter – Convert Between Binary, Decimal, Hex and Octal
Instantly convert numbers between binary (base 2), decimal (base 10), hexadecimal (base 16) and octal (base 8). Perfect for computer science students, developers and engineers. Free, no signup required.
Number Systems Explained
| System | Base | Digits Used | Used In |
| Binary | 2 | 0, 1 | Computer hardware, digital circuits, CPUs |
| Octal | 8 | 0–7 | Unix file permissions, older computing systems |
| Decimal | 10 | 0–9 | Everyday human counting system |
| Hexadecimal | 16 | 0–9, A–F | HTML/CSS colours, memory addresses, debugging |
Quick Conversion Table
| Decimal | Binary | Octal | Hexadecimal |
| 0 | 0000 | 0 | 0 |
| 5 | 0101 | 5 | 5 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
How to Convert: Step-by-Step
Decimal to Binary
Divide the number by 2 repeatedly and record remainders from bottom to top. Example: 13 → 13÷2=6 R1, 6÷2=3 R0, 3÷2=1 R1, 1÷2=0 R1 → Binary: 1101
Binary to Decimal
Multiply each bit by 2 raised to its position (from right, starting at 0) and sum. Example: 1101 = (1×8) + (1×4) + (0×2) + (1×1) = 8+4+0+1 = 13
Hexadecimal in CSS
Hex colours in CSS use 6 hex digits: #RRGGBB. Example: #FF5722 = Red:255, Green:87, Blue:34 — the signature orange of DigitalToolVault!
💡 In computer science, a byte = 8 bits = 2 hex digits. The maximum value of 1 byte is 11111111 in binary = 255 in decimal = FF in hexadecimal.
Frequently Asked Questions
Why do computers use binary?Computers use binary because digital circuits have two stable states — on (1) and off (0) — represented by high and low voltages. All complex operations (arithmetic, logic, storage) are built from these two states.
What is hexadecimal used for in programming?Hex is used for memory addresses, byte values, HTML/CSS colours, character encoding (Unicode), checksums and MAC addresses. It is compact — 2 hex digits represent exactly 1 byte.
What does chmod 755 mean in octal?In Unix/Linux, file permissions are stored in octal. 755 = 111 101 101 in binary = owner can read/write/execute, group can read/execute, others can read/execute.
Can I convert negative numbers or decimals?This tool converts non-negative integers. For signed integers, use Two's Complement representation. For decimal fractions in binary, the conversion uses a separate method (multiply by 2 and track integer parts).