Free binary converter — instantly convert numbers between binary, hex to decimal, decimal to binary, and octal. Essential number system converter for programmers, CS students, and anyone learning how computers represent data.
Convert between number bases instantly
Computers work in binary (base 2) because transistors inside processors have exactly two states: on (1) and off (0). Every piece of data — text, images, video, code — ultimately reduces to sequences of 1s and 0s stored in memory. Decimal (base 10) is the number system humans naturally use, while hexadecimal (base 16) is the programmer's shorthand for binary because one hex digit maps cleanly to exactly four binary bits. Converting between these number systems is a foundational skill in computer science, embedded systems programming, network engineering, and digital electronics. Understanding how hex to decimal and binary to decimal conversions work makes you a more effective developer at every level.
In practice, hexadecimal appears everywhere in the computing world. Web colors are six-digit hex codes — #FF5733 breaks into Red=FF (255), Green=57 (87), Blue=33 (51). IPv6 addresses like 2001:0db8:85a3::8a2e:0370:7334 are groups of 4 hex digits separated by colons. x86 memory addresses in debuggers show up as hex values like 0x7FFE4320. And Unix/Linux file permissions are set in octal — chmod 755 means owner has read (4) + write (2) + execute (1) = 7, group has read (4) + execute (1) = 5, others have the same 5. This binary and hex converter handles all four base conversions simultaneously — type in any field and the rest update instantly.
The native language of computers. Uses only 0 and 1 — each digit is one bit. 8 bits = 1 byte = values 0–255. Binary 1010 = Decimal 10. Binary 1111 1111 = Decimal 255 = Hex FF. The foundation of all digital data storage and processing.
Uses digits 0–9 and letters A–F. One hex digit represents exactly 4 binary bits, making it a compact shorthand. Hex FF = Binary 11111111 = Decimal 255. Used in web colors, memory addresses, machine code, and network protocols like IPv6.
Uses digits 0–7. Still relevant today in Unix/Linux file permission notation — chmod 755 (rwxr-xr-x) and chmod 644 (rw-r--r--) are classic examples. Each octal digit maps to 3 binary bits. Octal 7 = Binary 111 = Decimal 7.
HTML/CSS colors: hex (#3A86FF). IPv6 addresses: hex groups. Unicode characters: hex code points (U+1F600). Machine code and assembly: hex opcodes. RAM addresses in debuggers: hex. Unix permissions: octal. All RAM contents: binary. The number system converter helps you move fluently between them all.
Binary is base 2, so each position represents a power of two rather than of ten, and only the digits 0 and 1 exist. Arithmetic follows the same rules as decimal with a much lower carry threshold: 1 + 1 produces 0 with a carry, exactly as 9 + 1 does in decimal. Conversion to decimal is a matter of summing the place values where a 1 appears; conversion the other way is repeated division by 2, reading the remainders from last to first. Hexadecimal exists as a shorthand because 16 is 2⁴, so each hex digit maps to exactly four binary digits with no arithmetic required.
Decimal value = Σ (digit × 2^position), counting from 0 at the rightDecimal → binary: divide by 2 repeatedly, read remainders bottom-upAddition: 0+0=0 · 0+1=1 · 1+1=10 (0 carry 1) · 1+1+1=11 (1 carry 1)where:
Assumptions: Unsigned arithmetic. Signed integers normally use two's complement, where the leading bit indicates sign and negation is "invert all bits and add one" — which is why an 8-bit signed range is −128 to +127 rather than −127 to +127.
Add two binary numbers directly, then verify in decimal.
Result1011₂ + 1101₂ = 11000₂ (24 in decimal)
The result needed five bits to hold a sum of two four-bit numbers. In fixed-width arithmetic that carry out of the top bit is exactly what an overflow flag detects — and ignoring it is how a four-bit register would report 24 as 8.